nasty fix to mysterious window shrinking issue
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 10 Jun 2014 09:52:34 +0000 (09:52 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 10 Jun 2014 09:52:34 +0000 (09:52 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1644 01035d8c-6547-0410-b346-abe4f91aad63

fdmdv2/src/fdmdv2_main.cpp

index e01af5a0022161f1641d645b489f6e53ac5b1938..0c5055632ba0608627109bda4e30cdb04895f84c 100644 (file)
@@ -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);