keep velocity value visible in verbose cursor until we leave a note (fixes #5085)
[ardour.git] / gtk2_ardour / editor_regions.cc
index 1a2043943f17be5a3d87831597edaa8ced13b9e2..8561fbbfb53f99e7274e90408441a889ff5e13f1 100644 (file)
 
 #include "ardour/audioregion.h"
 #include "ardour/audiofilesource.h"
+#include "ardour/silentfilesource.h"
 #include "ardour/region_factory.h"
 #include "ardour/session.h"
-#include "ardour/session_playlists.h"
-#include "ardour/silentfilesource.h"
 #include "ardour/profile.h"
 
 #include "gtkmm2ext/choice.h"
@@ -48,6 +47,7 @@
 #include "utils.h"
 #include "editor_regions.h"
 #include "editor_drag.h"
+#include "main_clock.h"
 
 #include "i18n.h"
 
@@ -79,6 +79,7 @@ EditorRegions::EditorRegions (Editor* e)
 {
        _display.set_size_request (100, -1);
        _display.set_rules_hint (true);
+       _display.set_name ("EditGroupList");
 
        /* Try to prevent single mouse presses from initiating edits.
           This relies on a hack in gtktreeview.c:gtk_treeview_button_press()
@@ -212,11 +213,11 @@ EditorRegions::EditorRegions (Editor* e)
 
        //ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &Editor::redisplay_regions));
        ARDOUR_UI::instance()->secondary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::update_all_rows));
-       ARDOUR::Region::RegionPropertyChanged.connect (region_property_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::region_changed, this, _1, _2), gui_context());
-       ARDOUR::RegionFactory::CheckNewRegion.connect (check_new_region_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::add_region, this, _1), gui_context());
+       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, ui_bind (&EditorRegions::freeze_tree_model, this), gui_context());
-       e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::thaw_tree_model, this), 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
@@ -303,7 +304,6 @@ EditorRegions::add_region (boost::shared_ptr<Region> region)
 
                TreeModel::iterator iter = _model->get_iter ("0");
                TreeModel::Row parent;
-               TreeModel::Row child;
 
                if (!iter) {
                        parent = *(_model->append());
@@ -550,7 +550,7 @@ EditorRegions::selection_changed ()
 
                for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
 
-                       if (iter = _model->get_iter (*i)) {
+                       if ((iter = _model->get_iter (*i))) {
                                boost::shared_ptr<Region> region = (*iter)[_columns.region];
 
                                // they could have clicked on a row that is just a placeholder, like "Hidden"
@@ -835,7 +835,6 @@ EditorRegions::populate_row_position (boost::shared_ptr<Region> region, TreeMode
                row[_columns.position] = _("Mult.");
        } else {
                char buf[16];
-               cerr << "Adding a region " << region->name() << " at " << region->position() << endl;
                format_position (region->position(), buf, sizeof (buf));
                row[_columns.position] = buf;
        }