Fix (OSX only) for dirty redraws in adjacent mixer strips when resizing.

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4108 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2008-11-07 21:40:10 +00:00
parent 13e2813847
commit d0176c23e3
3 changed files with 33 additions and 4 deletions

View file

@ -504,9 +504,6 @@ MixerStrip::set_width (Width w, void* owner)
((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.astate_string(_route->panner().automation_state()));
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2);
set_size_request (-1, -1);
#ifdef GTKOSX
WidthChanged();
#endif
break;
case Narrow:
@ -536,6 +533,9 @@ MixerStrip::set_width (Width w, void* owner)
update_output_display ();
mix_group_changed (0);
name_changed (0);
#ifdef GTKOSX
WidthChanged();
#endif
}
void

View file

@ -312,7 +312,9 @@ Mixer_UI::add_strip (Session::RouteList& routes)
route->name_changed.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip));
strip->GoingAway.connect (bind (mem_fun(*this, &Mixer_UI::remove_strip), strip));
#ifdef GTKOSX
strip->WidthChanged.connect (mem_fun(*this, &Mixer_UI::queue_draw_all_strips));
#endif
strip->signal_button_release_event().connect (bind (mem_fun(*this, &Mixer_UI::strip_button_release_event), strip));
}
@ -743,6 +745,30 @@ Mixer_UI::redisplay_track_list ()
}
}
#ifdef GTKOSX
void
Mixer_UI::queue_draw_all_strips ()
{
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
long order;
for (order = 0, i = rows.begin(); i != rows.end(); ++i, ++order) {
MixerStrip* strip = (*i)[track_columns.strip];
if (strip == 0) {
continue;
}
bool visible = (*i)[track_columns.visible];
if (visible) {
strip->queue_draw();
}
}
}
#endif
void
Mixer_UI::set_auto_rebinding( bool val )
{

View file

@ -152,6 +152,9 @@ class Mixer_UI : public Gtk::Window
void redisplay_track_list ();
bool no_track_list_redisplay;
bool track_display_button_press (GdkEventButton*);
#ifdef GTKOSX
void queue_draw_all_strips ();
#endif
void track_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
void track_list_delete (const Gtk::TreeModel::Path&);