summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic_kdm.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-09 01:46:52 +0100
committerCarl Hetherington <cth@carlh.net>2025-09-28 19:49:26 +0200
commitdc67d7024b9f19d88826909787a3bf01e09be672 (patch)
tree73c28e0ebf3a1e7e9271f62e7db7a3e3fa966fc3 /src/tools/dcpomatic_kdm.cc
parenteb2bdeba655a47d1448977600cf682656bd4b8ab (diff)
Save and restore DoM KDM creator window position/size.1575-save-windows
Diffstat (limited to 'src/tools/dcpomatic_kdm.cc')
-rw-r--r--src/tools/dcpomatic_kdm.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index 31b40cfb7..77c67eedb 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -37,6 +37,7 @@
#include "wx/short_kdm_output_panel.h"
#include "wx/static_text.h"
#include "wx/tall_kdm_output_panel.h"
+#include "wx/window_metrics.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
#include "wx/wx_variant.h"
@@ -113,6 +114,7 @@ public:
: wxFrame (nullptr, -1, title)
, _config_dialog (nullptr)
, _job_view (nullptr)
+ , _metrics("dcpomatic-kdm", wxDefaultSize, this)
{
#if defined(DCPOMATIC_WINDOWS)
if (Config::instance()->win32_console ()) {
@@ -262,6 +264,13 @@ public:
_output->MethodChanged.connect(boost::bind(&DOMFrame::setup_sensitivity, this));
setup_sensitivity ();
+
+ _metrics.bind();
+ }
+
+ void show()
+ {
+ _metrics.show();
}
private:
@@ -862,6 +871,7 @@ private:
KDMOutputPanel* _output = nullptr;
JobViewDialog* _job_view;
Collator _collator;
+ WindowMetrics _metrics;
};
@@ -926,12 +936,11 @@ private:
_frame = new DOMFrame(variant::wx::dcpomatic_kdm_creator());
SetTopWindow (_frame);
- _frame->Maximize ();
if (splash) {
splash->Destroy ();
splash = nullptr;
}
- _frame->Show ();
+ _frame->show();
signal_manager = new wxSignalManager (this);
Bind (wxEVT_IDLE, boost::bind (&App::idle, this));