X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=eec81d3c80e36ec394f86cd5bb87f8e3890578f9;hp=a10cb9b35505f9b322f2033f79bafaa2c17ce34f;hb=d85bd416c6267e9c86948b9b5f2e5dba5e67f755;hpb=deb61d087799d18cce97b1f0f99fe036d2214a42 diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a10cb9b35..eec81d3c8 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -287,7 +287,11 @@ public: bool OnSashPositionChange(int new_position) override { /* Try to stop the left bit of the splitter getting too small */ - return new_position > _left_panel_minimum_size; + auto const ok = new_position > _left_panel_minimum_size; + if (ok) { + Config::instance()->set_main_divider_sash_position(new_position); + } + return ok; } private: @@ -297,7 +301,7 @@ private: /* The window is now fairly big but the left panel is small; this happens when the DCP-o-matic window * is shrunk and then made larger again. Try to set a sensible left panel size in this case. */ - SetSashPosition(_left_panel_minimum_size); + SetSashPosition(Config::instance()->main_divider_sash_position().get_value_or(_left_panel_minimum_size)); } ev.Skip(); @@ -410,7 +414,7 @@ public: _right_panel->SetSizer(right_sizer); - _splitter->SplitVertically(left_panel, _right_panel, left_panel->GetSize().GetWidth() + 8); + _splitter->SplitVertically(left_panel, _right_panel, Config::instance()->main_divider_sash_position().get_value_or(left_panel->GetSize().GetWidth() + 8)); set_menu_sensitivity ();