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 ();
- _sizer->Layout ();
+ layout ();
} else if (property == AudioContentProperty::GAIN) {
setup_peak ();
} else if (property == DCPContentProperty::REFERENCE_AUDIO) {
}
void
-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);
note->Show ();
}
+ layout ();
+}
+
+
+void
+ContentSubPanel::layout ()
+{
+ int x;
+ int y;
+ GetViewStart (&x, &y);
+ Scroll (0, 0);
_sizer->Layout ();
+ Scroll (x, y);
}
+
protected:
- 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;
}
checked_set (_description, d);
- _sizer->Layout ();
+ layout ();
}
void