void queue_visual_videotimeline_update ();
void embed_audio_from_video (std::string, framepos_t n = 0, bool lock_position_to_video = true);
+ PBD::Signal0<void> EditorFreeze;
+ PBD::Signal0<void> EditorThaw;
+
private:
friend class DragManager;
friend class EditorRouteGroups;
void
Editor::split_regions_at (framepos_t where, RegionSelection& regions)
{
+ bool frozen = false;
+
RegionSelection pre_selected_regions = selection->regions;
bool working_on_selection = !pre_selected_regions.empty();
} else {
snap_to (where);
+ frozen = true;
+ EditorFreeze(); /* Emit Signal */
}
for (RegionSelection::iterator a = regions.begin(); a != regions.end(); ) {
(*c).disconnect ();
}
+ if (frozen){
+ EditorThaw(); /* Emit Signal */
+ }
+
if (working_on_selection) {
// IFF we were working on selected regions, try to reinstate the other region selections that existed before the freeze/thaw.
ARDOUR::Region::RegionPropertyChanged.connect (region_property_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::region_changed, this, _1, _2), gui_context());
ARDOUR::RegionFactory::CheckNewRegion.connect (check_new_region_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::add_region, this, _1), gui_context());
+ e->EditorFreeze.connect (editor_freeze_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::freeze_tree_model, this), gui_context());
+ e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::thaw_tree_model, this), gui_context());
}
bool
return (*iter)[_columns.region];
}
+void
+EditorRegions::freeze_tree_model (){
+
+ _display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
+ _model->set_sort_column (-2, SORT_ASCENDING); //Disable sorting to gain performance
+
+}
+
+void
+EditorRegions::thaw_tree_model (){
+
+ _model->set_sort_column (0, SORT_ASCENDING); // renabale sorting
+ _display.set_model (_model);
+
+ if (toggle_full_action()->get_active()) {
+ _display.expand_all();
+ }
+}
+
void
EditorRegions::locked_changed (std::string const & path)
{
return;
}
+ editor.EditorFreeze(); /* Emit signal */
+
editor.begin_reversible_command (_("split regions (rhythm ferret)"));
/* Merge the transient positions for regions in consideration */
}
editor.commit_reversible_command ();
+
+ editor.EditorThaw(); /* Emit signal */
}
void