Pinta.MainWindow.HistoryItemSelected C# (CSharp) Method

HistoryItemSelected() public method

public HistoryItemSelected ( Gtk.TreeSelection selection, TreeModel model, Gtk.TreePath path, bool path_currently_selected ) : bool
selection Gtk.TreeSelection
model TreeModel
path Gtk.TreePath
path_currently_selected bool
return bool
        public bool HistoryItemSelected(TreeSelection selection, TreeModel model, TreePath path, bool path_currently_selected)
        {
            int current = path.Indices[0];
            if (!path_currently_selected) {
                while (PintaCore.History.Pointer < current) {
                    PintaCore.History.Redo ();
                }
                while (PintaCore.History.Pointer > current) {
                    PintaCore.History.Undo ();
                }
            }
            return true;
        }