It seems that if Layout() is called on a sizer inside a wxScrolledWindow
when that window is scrolled, things go wrong. Work around this by
wrapping calls to Layout().
}
setup_description ();
setup_peak ();
}
setup_description ();
setup_peak ();
} else if (property == AudioContentProperty::GAIN) {
setup_peak ();
} else if (property == DCPContentProperty::REFERENCE_AUDIO) {
} else if (property == AudioContentProperty::GAIN) {
setup_peak ();
} else if (property == DCPContentProperty::REFERENCE_AUDIO) {
-ContentSubPanel::setup_refer_button (wxCheckBox* button, wxStaticText* note, shared_ptr<DCPContent> dcp, bool can_reference, wxString cannot) const
+ContentSubPanel::setup_refer_button (wxCheckBox* button, wxStaticText* note, shared_ptr<DCPContent> dcp, bool can_reference, wxString cannot)
{
button->Enable (can_reference);
{
button->Enable (can_reference);
+ layout ();
+}
+
+
+void
+ContentSubPanel::layout ()
+{
+ int x;
+ int y;
+ GetViewStart (&x, &y);
+ Scroll (0, 0);
- void setup_refer_button (wxCheckBox* button, wxStaticText* note, std::shared_ptr<DCPContent> dcp, bool can_reference, wxString cannot) const;
+ void setup_refer_button (wxCheckBox* button, wxStaticText* note, std::shared_ptr<DCPContent> dcp, bool can_reference, wxString cannot);
+ void layout ();
virtual void add_to_grid () = 0;
ContentPanel* _parent;
virtual void add_to_grid () = 0;
ContentPanel* _parent;
}
checked_set (_description, d);
}
checked_set (_description, d);