+Dock_History::on_undo_tree_changed()
+{
+ Gtk::TreeModel::Children children(selected_instance->history_tree_store()->children());
+
+ if (!children.size())
+ return;
+
+ studio::HistoryTreeStore::Model model;
+
+ Gtk::TreeModel::Children::iterator iter, prev = children.end();
+ for (iter = children.begin(); iter != children.end(); prev = iter++)
+ if ((*iter)[model.is_redo])
+ {
+ if (prev == children.end())
+ action_tree->get_selection()->unselect_all();
+ else
+ {
+ action_tree->scroll_to_row(Gtk::TreePath(prev), 0.5);
+ action_tree->get_selection()->select(prev);
+ }
+ return;
+ }
+
+ action_tree->scroll_to_row(Gtk::TreePath(prev), 0.5);
+ action_tree->get_selection()->select(prev);
+}
+
+void