ide/Panels: (#965) Fixed non-sensical repositioning of Windows on activation
authorJerome St-Louis <jerome@ecere.com>
Thu, 8 Aug 2013 07:41:54 +0000 (03:41 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 8 Aug 2013 07:41:54 +0000 (03:41 -0400)
ide/src/ide.ec
ide/src/panels/BreakpointsView.ec
ide/src/panels/CallStackView.ec
ide/src/panels/OutputView.ec
ide/src/panels/ThreadsView.ec
ide/src/panels/WatchesView.ec
ide/src/project/ProjectView.ec
ide/src/project/Workspace.ec

index 39ecb66..2e9cc4b 100644 (file)
@@ -466,13 +466,6 @@ class IDEWorkSpace : Window
          return true;
       }
 
-      bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
-      {
-         if(active)
-            ide.RepositionWindows(false);
-         return true;
-      }
-
       bool OnClose(bool parentClosing)
       {
          visible = false;
@@ -543,13 +536,6 @@ class IDEWorkSpace : Window
          return true;
       }
 
-      bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
-      {
-         if(active)
-            ide.RepositionWindows(false);
-         return true;
-      }
-
       bool OnClose(bool parentClosing)
       {
          visible = false;
@@ -630,13 +616,6 @@ class IDEWorkSpace : Window
          return true;
       }
 
-      bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
-      {
-         if(active)
-            ide.RepositionWindows(false);
-         return true;
-      }
-
       bool OnClose(bool parentClosing)
       {
          visible = false;
@@ -710,6 +689,7 @@ class IDEWorkSpace : Window
                   {
                      if(!projectView && gotWhatWeWant)
                         ChangeFileDialogsDirectory(ideFileDialog.currentDirectory, true);
+                     ide.RepositionWindows(false);
                      break;
                   }
                }
@@ -805,7 +785,10 @@ class IDEWorkSpace : Window
                   delete command;
                }
                else
+               {
                   OpenFile(file, normal, true, isProjectFile ? "txt" : null, no, normal, mods.ctrl && mods.shift);
+                  ide.RepositionWindows(false);
+               }
                break;
             }
             id++;
@@ -1619,6 +1602,7 @@ class IDEWorkSpace : Window
                anchor.bottom = bottomDistance;
                if(child._class == class(CodeEditor) || child._class == class(Designer))
                {
+                  anchor.left = 300;
                   anchor.right = toolBoxVisible ? 150 : 0;
                }
                child.anchor = anchor;
@@ -2159,6 +2143,7 @@ class IDEWorkSpace : Window
                               }
                            }
                         }
+                        ide.RepositionWindows(false);
                         workspace.holdTracking = false;
 
                         workspace.timer.Start();
index e00bd62..d3a0602 100644 (file)
@@ -142,13 +142,6 @@ class BreakpointsView : Window
       return true;
    }
 
-   bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
-   {
-      if(active)
-         ide.RepositionWindows(false);
-      return true;
-   }
-
    bool OnClose(bool parentClosing)
    {
       visible = false;
@@ -189,6 +182,7 @@ class BreakpointsView : Window
    void Show()
    {
       visible = true;
+      ide.RepositionWindows(false);
       Activate();
    }
 
index 7544ed0..2fbd364 100644 (file)
@@ -153,6 +153,7 @@ class CallStackView : Window
    void Show()
    {
       visible = true;
+      ide.RepositionWindows(false);
       Activate();
    }
 }
index 8c8840c..40bf319 100644 (file)
@@ -243,6 +243,7 @@ class OutputView : Window
    void Show()
    {
       visible = true;
+      ide.RepositionWindows(false);
       Activate();
    }
    void ShowClearSelectTab(OutputViewTab tab)
index 5bbf1c3..0b02522 100644 (file)
@@ -177,6 +177,7 @@ class ThreadsView : Window
    void Show()
    {
       visible = true;
+      ide.RepositionWindows(false);
       Activate();
    }
 
index b09fe90..f0c1639 100644 (file)
@@ -94,16 +94,6 @@ class WatchesView : Window
       return true;
    }
 
-   bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
-   {
-      if(active)
-      {
-         //listBox.SelectRow(listBox.firstRow);
-         ide.RepositionWindows(false);
-      }
-      return true;
-   }
-
    bool OnClose(bool parentClosing)
    {
       visible = false;
@@ -115,6 +105,7 @@ class WatchesView : Window
    void Show()
    {
       visible = true;
+      ide.RepositionWindows(false);
       Activate();
    }
 
index f944c38..fc3d7ba 100644 (file)
@@ -2225,6 +2225,7 @@ class ProjectView : Window
          }
       }
       selection.Free(null);
+      ide.RepositionWindows(false);
       return result;
    }
 
index c577a00..bdff439 100644 (file)
@@ -1207,6 +1207,5 @@ Workspace LoadWorkspace(char * filePath, char * fromProjectFile)
       if(!workspace.compiler || !workspace.compiler[0])
          workspace.compiler = defaultCompilerName;
    }
-
    return workspace;
 }