diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-12 22:48:13 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-14 11:41:18 +0200 |
| commit | deb61d087799d18cce97b1f0f99fe036d2214a42 (patch) | |
| tree | 3d20ce5bcc862d6fef5a194d0e2449e7400a7daf /src/wx/content_panel.cc | |
| parent | f479e6edc5152edfa4b21f85e925b890818817af (diff) | |
Allow dragging of the border between the controls and the preview (#2350).
Diffstat (limited to 'src/wx/content_panel.cc')
| -rw-r--r-- | src/wx/content_panel.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index af35e2d3b..df6308bea 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -112,7 +112,8 @@ public: private: void sized(wxSizeEvent& ev) { - if (_first_shown && GetSize().GetHeight() > _top_panel_minimum_size && GetSashPosition() < _top_panel_minimum_size) { + auto const height = GetSize().GetHeight(); + if (_first_shown && (!_last_height || *_last_height != height) && height > _top_panel_minimum_size && GetSashPosition() < _top_panel_minimum_size) { /* The window is now fairly big but the top panel is small; this happens when the DCP-o-matic window * is shrunk and then made larger again. Try to set a sensible top panel size in this case (#1839). */ @@ -120,10 +121,12 @@ private: } ev.Skip (); + _last_height = height; } bool _first_shown = false; int const _top_panel_minimum_size = 350; + boost::optional<int> _last_height; }; |
