Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10782)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj	(revision 10783)
@@ -72,8 +72,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Implementations\FilteredPreprocessingData.cs" />
     <Compile Include="Implementations\ManipulationContent.cs" />
     <Compile Include="Implementations\PreprocessingChartContent.cs" />
     <Compile Include="Implementations\PreprocessingData.cs" />
     <Compile Include="Implementations\DataGridLogic.cs" />
+    <Compile Include="Interfaces\IFilteredPreprocessingData.cs" />
     <Compile Include="Utils\DataPreprocessingChangedEvent.cs" />
     <Compile Include="Implementations\Filter\ComparisonFilter.cs" />
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs	(revision 10782)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs	(revision 10783)
@@ -24,10 +24,12 @@
 using System;
 using System.Linq;
+using HeuristicLab.DataPreprocessing.Interfaces;
 namespace HeuristicLab.DataPreprocessing {
   public class FilterLogic : IFilterLogic {
 
-    private ITransactionalPreprocessingData preprocessingData;
+    private IFilteredPreprocessingData preprocessingData;
 
-    public FilterLogic(ITransactionalPreprocessingData preprocessingData) {
+    public FilterLogic(IFilteredPreprocessingData preprocessingData)
+    {
       this.preprocessingData = preprocessingData;
     }
@@ -52,4 +54,6 @@
         }
 
+        preprocessingData.SetFilter(result);
+        
         return result;
     }
@@ -57,18 +61,11 @@
     public void Apply(IList<IFilter> filters)
     {
-        bool[] results = Preview(filters);
+        preprocessingData.SetFilter(Preview(filters));
+        preprocessingData.PersistFilter();
+    }
 
-        preprocessingData.InTransaction(() =>
-        {
-          for (int row = (results.Length - 1); row >= 0; --row)
-          {
-            if (results[row])
-            {
-              preprocessingData.DeleteRow(row);
-            }
-          }
-        });
-     }
-
+    public void Reset() {
+      preprocessingData.ResetFilter();
+    }
 
     public IPreprocessingData PreprocessingData
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs	(revision 10783)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs	(revision 10783)
@@ -0,0 +1,202 @@
+﻿using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Transformations;
+using HeuristicLab.DataPreprocessing.Interfaces;
+
+namespace HeuristicLab.DataPreprocessing.Implementations
+{
+  public class FilteredPreprocessingData : NamedItem, IFilteredPreprocessingData
+  {
+    protected ITransactionalPreprocessingData originalData;
+    protected ITransactionalPreprocessingData filteredData;
+
+    protected FilteredPreprocessingData(FilteredPreprocessingData original, Cloner cloner)
+      : base(original, cloner) {
+        originalData = (ITransactionalPreprocessingData)original.originalData;
+        filteredData = (ITransactionalPreprocessingData)original.filteredData;
+    }
+
+    public FilteredPreprocessingData(ITransactionalPreprocessingData preporcessingData)
+      : base() {
+        originalData = preporcessingData;
+        filteredData = null;
+    }
+
+     public override IDeepCloneable Clone(Cloner cloner)
+     {
+       return new FilteredPreprocessingData(this, cloner);
+     }
+
+     public T GetCell<T>(int columnIndex, int rowIndex)
+     {
+       return ActiveData.GetCell<T>(columnIndex, rowIndex);
+     }
+
+     public void SetCell<T>(int columnIndex, int rowIndex, T value)
+     {
+       ReadOnlyOnFilterData.SetCell<T>(columnIndex, rowIndex, value);
+     }
+
+     public string GetCellAsString(int columnIndex, int rowIndex)
+     {
+       return ActiveData.GetCellAsString(columnIndex, rowIndex);
+     }
+
+     public IList<T> GetValues<T>(string variableName)
+     {
+       return ActiveData.GetValues<T>(variableName);
+     }
+
+     public IList<T> GetValues<T>(int columnIndex)
+     {
+       return ActiveData.GetValues<T>(columnIndex);
+     }
+
+     public void SetValues<T>(int columnIndex, IList<T> values)
+     {
+       ReadOnlyOnFilterData.SetValues<T>(columnIndex, values);
+     }
+
+     public void InsertRow(int rowIndex)
+     {
+       ReadOnlyOnFilterData.InsertRow(rowIndex);
+     }
+
+     public void DeleteRow(int rowIndex)
+     {
+       ReadOnlyOnFilterData.DeleteRow(rowIndex);
+     }
+
+     public void InsertColumn<T>(string variableName, int columnIndex)
+     {
+       ReadOnlyOnFilterData.InsertColumn<T>(variableName, columnIndex);
+     }
+
+     public void DeleteColumn(int columnIndex)
+     {
+       ReadOnlyOnFilterData.DeleteColumn(columnIndex);
+     }
+
+     public IntRange TrainingPartition
+     {
+       get { return originalData.TrainingPartition; }
+     }
+
+     public IntRange TestPartition
+     {
+       get { return originalData.TestPartition; }
+     }
+
+     public IList<ITransformation> Transformations
+     {
+       get { return originalData.Transformations; }
+     }
+
+     public IEnumerable<string> VariableNames
+     {
+       get { return ActiveData.VariableNames; }
+     }
+
+     public string GetVariableName(int columnIndex)
+     {
+       return ActiveData.GetVariableName(columnIndex);
+     }
+
+     public int GetColumnIndex(string variableName)
+     {
+       return ActiveData.GetColumnIndex(variableName);
+     }
+
+     public bool IsType<T>(int columnIndex)
+     {
+       return originalData.IsType<T>(columnIndex);
+     }
+
+     public int Columns
+     {
+       get { return ActiveData.Columns; }
+     }
+
+     public int Rows
+     {
+       get { return ActiveData.Rows; }
+     }
+
+     public Dataset ExportToDataset()
+     {
+       return originalData.ExportToDataset();
+     }
+
+     public void SetFilter(bool[] rowFilters) {
+
+       filteredData = (ITransactionalPreprocessingData)originalData.Clone();
+
+       for (int row = (rowFilters.Length - 1); row >= 0; --row)
+       {
+         if (rowFilters[row])
+         {
+           filteredData.DeleteRow(row);
+         }
+       }
+     }
+
+     public void PersistFilter() {
+       originalData = (ITransactionalPreprocessingData)filteredData.Clone();
+       ResetFilter();
+     }
+
+     public void ResetFilter() {
+       filteredData = null;
+     }
+
+     public ITransactionalPreprocessingData ActiveData
+     {
+       get { return IsFiltered ? filteredData : originalData; }
+     }
+
+     public ITransactionalPreprocessingData ReadOnlyOnFilterData
+     {
+       get {
+         if (IsFiltered)
+            throw new InvalidOperationException();
+         
+         return originalData;
+       }
+     }
+
+     public bool IsFiltered {
+       get { return filteredData != null; }
+     }
+
+     public event DataPreprocessingChangedEventHandler Changed;
+
+     public bool IsUndoAvailable
+     {
+       get { return IsFiltered ? false : originalData.IsUndoAvailable; }
+     }
+
+     public void Undo()
+     {
+       ReadOnlyOnFilterData.Undo();
+     }
+
+     public void InTransaction(Action action, DataPreprocessingChangedEventType type = DataPreprocessingChangedEventType.Any)
+     {
+       ReadOnlyOnFilterData.InTransaction(action, type);
+     }
+
+     public void BeginTransaction(DataPreprocessingChangedEventType type)
+     {
+       ReadOnlyOnFilterData.BeginTransaction(type);
+     }
+
+     public void EndTransaction()
+     {
+       originalData.EndTransaction();
+     }
+  }
+}
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs	(revision 10782)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs	(revision 10783)
@@ -28,4 +28,6 @@
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
 using Variable = HeuristicLab.Problems.DataAnalysis.Symbolic.Variable;
+using HeuristicLab.DataPreprocessing.Implementations;
+using HeuristicLab.DataPreprocessing.Interfaces;
 
 namespace HeuristicLab.DataPreprocessing {
@@ -34,5 +36,5 @@
     : Item, IPreprocessingContext {
 
-    public ITransactionalPreprocessingData Data { get; private set; }
+    public IFilteredPreprocessingData Data { get; private set; }
 
     public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; }
@@ -43,5 +45,8 @@
 
     public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, IDataAnalysisProblem problem) {
-      Data = new TransactionalPreprocessingData(dataAnalysisProblemData);
+
+      TransactionalPreprocessingData transactionalPreprocessingData = new TransactionalPreprocessingData(dataAnalysisProblemData);
+
+      Data = new FilteredPreprocessingData(transactionalPreprocessingData);
       DataAnalysisProblemData = dataAnalysisProblemData;
       Algorithm = algorithm;
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs	(revision 10782)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs	(revision 10783)
@@ -84,7 +84,7 @@
 
     protected IList<IList> CopyVariableValues(IList<IList> original) {
-      var copy = new List<IList>(variableValues);
+      var copy = new List<IList>(original);
       for (int i = 0; i < original.Count; ++i) {
-        variableValues[i] = (IList)Activator.CreateInstance(original[i].GetType(), original[i]);
+        copy[i] = (IList)Activator.CreateInstance(original[i].GetType(), original[i]);
       }
       return copy;
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IFilteredPreprocessingData.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IFilteredPreprocessingData.cs	(revision 10783)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IFilteredPreprocessingData.cs	(revision 10783)
@@ -0,0 +1,14 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.DataPreprocessing.Interfaces
+{
+  public interface IFilteredPreprocessingData : ITransactionalPreprocessingData
+  {
+    void SetFilter(bool[] rowFilters);
+    void PersistFilter();
+    void ResetFilter();
+   }
+}
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs	(revision 10782)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs	(revision 10783)
@@ -24,4 +24,5 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.DataPreprocessing.Interfaces;
 
 namespace HeuristicLab.DataPreprocessing {
@@ -29,5 +30,5 @@
     : IItem {
 
-    ITransactionalPreprocessingData Data { get; }
+    IFilteredPreprocessingData Data { get; }
 
     [Obsolete]
