simplify arguments to Editor::sensitize_the_right_region_actions()
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 15 Feb 2017 18:50:51 +0000 (19:50 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 15 Feb 2017 19:07:49 +0000 (20:07 +0100)
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_canvas.cc
gtk2_ardour/editor_selection.cc

index b13e2517c3eebe5d0d56f11f957e78033ce46d00..8e186e3c04fb771513c2174d6915123877d1d419 100644 (file)
@@ -1698,7 +1698,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
        /* When the region menu is opened, we setup the actions so that they look right
           in the menu.
        */
-       sensitize_the_right_region_actions (true, false);
+       sensitize_the_right_region_actions (false);
        _last_region_menu_was_main = false;
 
        menu->signal_hide().connect (sigc::bind (sigc::mem_fun (*this, &Editor::sensitize_all_region_actions), true));
index fbf050bd8710828cca06b061688b31de1287c070..0efacd98eb1190aa763ae85ad499262579b55b29 100644 (file)
@@ -1845,7 +1845,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void region_selection_changed ();
        sigc::connection editor_regions_selection_changed_connection;
        void sensitize_all_region_actions (bool);
-       void sensitize_the_right_region_actions (bool from_context_menu, bool from_outside_canvas);
+       void sensitize_the_right_region_actions (bool because_canvas_crossing);
        bool _all_region_actions_sensitized;
        /** Flag to block region action handlers from doing what they normally do;
         *  I tried Gtk::Action::block_activate() but this doesn't work (ie it doesn't
index 0799645ed9013fa3dfe2996b5682b5fef1c59a1b..ff7a6675545036b5ef5b981c972c099294a31394 100644 (file)
@@ -821,9 +821,9 @@ Editor::left_track_canvas (GdkEventCrossing* ev)
                if (ev->detail == GDK_NOTIFY_NONLINEAR ||
                    ev->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL) {
                        /* context menu or something similar */
-                       sensitize_the_right_region_actions (true, false);
+                       sensitize_the_right_region_actions (false);
                } else {
-                       sensitize_the_right_region_actions (false, true);
+                       sensitize_the_right_region_actions (true);
                }
        }
 
@@ -841,9 +841,9 @@ Editor::entered_track_canvas (GdkEventCrossing* ev)
                if (ev->detail == GDK_NOTIFY_NONLINEAR ||
                    ev->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL) {
                        /* context menu or something similar */
-                       sensitize_the_right_region_actions (true, false);
+                       sensitize_the_right_region_actions (false);
                } else {
-                       sensitize_the_right_region_actions (false, true);
+                       sensitize_the_right_region_actions (true);
                }
        }
 
index a6a035798e4a81fec35efc2b859c3d07d8569fec..c4657ed917800a00a543411b9d2432f6e0174c06 100644 (file)
@@ -1093,7 +1093,7 @@ Editor::sensitize_all_region_actions (bool s)
  *  Editor::{entered,left}_track_canvas() for details there.
  */
 void
-Editor::sensitize_the_right_region_actions (bool from_context_menu, bool from_canvas_crossing)
+Editor::sensitize_the_right_region_actions (bool because_canvas_crossing)
 {
        bool have_selection = false;
        bool have_entered = false;
@@ -1116,7 +1116,7 @@ Editor::sensitize_the_right_region_actions (bool from_context_menu, bool from_ca
                 * here depends on the context in which we are called
                 */
 
-               if (from_canvas_crossing) {
+               if (because_canvas_crossing) {
                        if (!within_track_canvas && _edit_point == EditAtMouse) {
                                have_edit_point = false;
                        } else {
@@ -1130,8 +1130,6 @@ Editor::sensitize_the_right_region_actions (bool from_context_menu, bool from_ca
                                        rs.insert (rs.end(), at_edit_point.begin(), at_edit_point.end());
                                }
                        }
-               } else if (from_context_menu) {
-                       /* we have a context click event */
                }
        }
 
@@ -1430,7 +1428,7 @@ Editor::region_selection_changed ()
        _regions->block_change_connection (false);
        editor_regions_selection_changed_connection.block(false);
 
-       sensitize_the_right_region_actions (false, false);
+       sensitize_the_right_region_actions (false);
 
        /* propagate into backend */