From 37c96af967edd92161e5ff812a12bdc0b18600a9 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 10 Jun 2014 09:52:34 +0000 Subject: [PATCH] nasty fix to mysterious window shrinking issue git-svn-id: https://svn.code.sf.net/p/freetel/code@1644 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2/src/fdmdv2_main.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index e01af5a0..0c505563 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -205,6 +205,7 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) // sanitise frame position as a first pass at Win32 registry bug + printf("x = %d y = %d w = %d h = %d\n", x,y,w,h); if (x < 0) x = 20; if (y < 0) y = 20; if (w < 0) w = 800; @@ -230,7 +231,7 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) Move(x, y); SetClientSize(w, h); - + if(wxGetApp().m_show_wf) { // Add Waterfall Plot window @@ -482,8 +483,14 @@ MainFrame::~MainFrame() { if (!IsIconized()) { GetClientSize(&w, &h); + + // big hack - for some reason height shrinks by this much + // every time FreeDV runs! I have no idea why + + h += 23; + GetPosition(&x, &y); - //wxLogDebug("x = %d y = %d w = %d h = %d\n", x,y,w,h); + printf("x = %d y = %d w = %d h = %d\n", x,y,w,h); pConfig->Write(wxT("/MainFrame/left"), (long) x); pConfig->Write(wxT("/MainFrame/top"), (long) y); pConfig->Write(wxT("/MainFrame/width"), (long) w); -- 2.25.1