diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-08-07 21:37:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-08-07 21:37:35 +0200 |
| commit | 563fc75855b9649cf135cf137cc1b0c43ebc8286 (patch) | |
| tree | fc9862a10f052725b6bd1a1af0101b167c19891b /src/tools | |
| parent | ec65767c7b1b8439b2b1414998db9c1f4048c1de (diff) | |
Fix layout bug where the stuff in the content panel would be completely
hidden in some cases (seen on Linux only, I think).
wxDisplay::GetFromWindow sometimes returns -1 (perhaps when multiple
monitors are connected) and we have to set the splitter position
in this case.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 1a6c1195c..3275984e6 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -268,6 +268,7 @@ public: , _history_position (0) , _history_separator (0) , _update_news_requested (false) + , _first_shown_called (false) { #if defined(DCPOMATIC_WINDOWS) if (Config::instance()->win32_console ()) { @@ -336,6 +337,7 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_report_a_problem, this), ID_help_report_a_problem); Bind (wxEVT_CLOSE_WINDOW, boost::bind (&DOMFrame::close, this, _1)); + Bind (wxEVT_SHOW, boost::bind (&DOMFrame::show, this, _1)); /* Use a panel as the only child of the Frame so that we avoid the dark-grey background on Windows. @@ -490,6 +492,14 @@ public: private: + void show (wxShowEvent& ev) + { + if (ev.IsShown() && !_first_shown_called) { + _film_editor->first_shown (); + _first_shown_called = true; + } + } + void film_message (string m) { message_dialog (this, std_to_wx(m)); @@ -1498,6 +1508,7 @@ private: boost::signals2::scoped_connection _analytics_message_connection; bool _update_news_requested; shared_ptr<Content> _clipboard; + bool _first_shown_called; }; static const wxCmdLineEntryDesc command_line_description[] = { |
