Fixed refresh of strip and track hide buttons.
authorTaybin Rutkin <taybin@taybin.com>
Mon, 13 Nov 2006 03:49:00 +0000 (03:49 +0000)
committerTaybin Rutkin <taybin@taybin.com>
Mon, 13 Nov 2006 03:49:00 +0000 (03:49 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1122 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/automation_time_axis.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/visual_time_axis.cc

index 22b6e10ac8037a310186b5b53839cee15ce4f74a..147e6ff0d14f1ee5afa0bfa0c1a7850a67950280 100644 (file)
@@ -402,8 +402,13 @@ AutomationTimeAxisView::set_samples_per_unit (double spu)
 void
 AutomationTimeAxisView::hide_clicked ()
 {
+       // LAME fix for refreshing the hide button
+       hide_button.set_sensitive(false);
+       
        set_marked_for_display (false);
        hide ();
+       
+       hide_button.set_sensitive(true);
 }
 
 void
index 76cce057ee8f7e2cd9555b729c2b64d083633a5c..dd60c5194196cb980eddfcfa2ddb8f1e327f50da 100644 (file)
@@ -124,34 +124,31 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt
        output_label.set_name ("MixerIOButtonLabel");
 
        _route->meter_change.connect (mem_fun(*this, &MixerStrip::meter_changed));
-               meter_point_button.add (meter_point_label);
-               meter_point_button.set_name ("MixerStripMeterPreButton");
-               meter_point_label.set_name ("MixerStripMeterPreButton");
-               
-               switch (_route->meter_point()) {
-               case MeterInput:
-                       meter_point_label.set_text (_("input"));
-                       break;
-                       
-               case MeterPreFader:
-                       meter_point_label.set_text (_("pre"));
-                       break;
-                       
-               case MeterPostFader:
-                       meter_point_label.set_text (_("post"));
-                       break;
-               }
+       meter_point_button.add (meter_point_label);
+       meter_point_button.set_name ("MixerStripMeterPreButton");
+       meter_point_label.set_name ("MixerStripMeterPreButton");
+       
+       switch (_route->meter_point()) {
+       case MeterInput:
+               meter_point_label.set_text (_("input"));
+               break;
                
-               /* TRANSLATORS: this string should be longest of the strings
-                  used to describe meter points. In english, its "input".
-               */
+       case MeterPreFader:
+               meter_point_label.set_text (_("pre"));
+               break;
                
-               set_size_request_to_display_given_text (meter_point_button, _("tupni"), 5, 5);
-
-
-               bottom_button_table.attach (meter_point_button, 1, 2, 0, 1);
-
-
+       case MeterPostFader:
+               meter_point_label.set_text (_("post"));
+               break;
+       }
+       
+       /* TRANSLATORS: this string should be longest of the strings
+          used to describe meter points. In english, it's "input".
+       */
+       set_size_request_to_display_given_text (meter_point_button, _("tupni"), 5, 5);
+    
+       bottom_button_table.attach (meter_point_button, 1, 2, 0, 1);
+    
        meter_point_button.signal_button_press_event().connect (mem_fun (gpm, &GainMeter::meter_press), false);
        /* XXX what is this meant to do? */
        //meter_point_button.signal_button_release_event().connect (mem_fun (gpm, &GainMeter::meter_release), false);
@@ -1092,11 +1089,17 @@ MixerStrip::width_clicked ()
 void
 MixerStrip::hide_clicked ()
 {
+    // LAME fix to reset the button status for when it is redisplayed (part 1)
+    hide_button.set_sensitive(false);
+    
        if (_embedded) {
                 Hiding(); /* EMIT_SIGNAL */
        } else {
                _mixer.hide_strip (this);
        }
+       
+    // (part 2)
+       hide_button.set_sensitive(true);
 }
 
 void
index 1ba1be445e094d2a77416edefdd88b167f188bb1..ff3f7eb25fd5debb72a58784c9a90a26180d3452 100644 (file)
@@ -393,11 +393,11 @@ Mixer_UI::disconnect_from_session ()
 void
 Mixer_UI::show_strip (MixerStrip* ms)
 {
-        TreeModel::Children rows = track_model->children();
+       TreeModel::Children rows = track_model->children();
        TreeModel::Children::iterator i;
-
+       
        for (i = rows.begin(); i != rows.end(); ++i) {
-
+       
                MixerStrip* strip = (*i)[track_columns.strip];
                if (strip == ms) {
                        (*i)[track_columns.visible] = true;
@@ -409,7 +409,7 @@ Mixer_UI::show_strip (MixerStrip* ms)
 void
 Mixer_UI::hide_strip (MixerStrip* ms)
 {
-        TreeModel::Children rows = track_model->children();
+       TreeModel::Children rows = track_model->children();
        TreeModel::Children::iterator i;
        
        for (i = rows.begin(); i != rows.end(); ++i) {
@@ -419,37 +419,37 @@ Mixer_UI::hide_strip (MixerStrip* ms)
                        (*i)[track_columns.visible] = false;
                        break;
                }
-        }
- }
+       }
+}
 
- gint
- Mixer_UI::start_updating ()
- {
-        fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Mixer_UI::fast_update_strips));
-        return 0;
- }
+gint
+Mixer_UI::start_updating ()
+{
+    fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Mixer_UI::fast_update_strips));
+    return 0;
+}
 
- gint
- Mixer_UI::stop_updating ()
- {
-        fast_screen_update_connection.disconnect();
-        return 0;
- }
+gint
+Mixer_UI::stop_updating ()
+{
+    fast_screen_update_connection.disconnect();
+    return 0;
+}
 
- void
- Mixer_UI::fast_update_strips ()
- {
-        if (is_mapped () && session) {
-                for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
-                        (*i)->fast_update ();
-                }
-        }
- }
+void
+Mixer_UI::fast_update_strips ()
+{
+       if (is_mapped () && session) {
+               for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
+                       (*i)->fast_update ();
+               }
+       }
+}
 
 void
 Mixer_UI::set_all_strips_visibility (bool yn)
 {
-        TreeModel::Children rows = track_model->children();
+       TreeModel::Children rows = track_model->children();
        TreeModel::Children::iterator i;
 
        no_track_list_redisplay = true;
index 22f09691051f4422e5415350bd0ea65550b1a816..7769a185c7ef2cc5ed3831bbdaac83ec6ad75a37 100644 (file)
@@ -1122,7 +1122,12 @@ RouteTimeAxisView::visual_click ()
 void
 RouteTimeAxisView::hide_click ()
 {
+       // LAME fix for hide_button refresh fix
+       hide_button.set_sensitive(false);
+       
        editor.hide_track_in_display (*this);
+       
+       hide_button.set_sensitive(true);
 }
 
 boost::shared_ptr<Region>
index fc71795a7100b8bd91208352261b9e3b5bb187ba..24cafdbe67a0985b74bc3e660ab6d53c7ed11361 100644 (file)
@@ -199,7 +199,12 @@ VisualTimeAxis::visual_click()
 void
 VisualTimeAxis::hide_click()
 {
+       // LAME fix for hide_button display refresh
+       hide_button.set_sensitive(false);
+       
        editor.hide_track_in_display (*this);
+       
+       hide_button.set_sensitive(true);
 }