ecere/gui/Window; EDA/ERS: New 'noConsequential' property to address performance...
authorJerome St-Louis <jerome@ecere.com>
Wed, 9 Dec 2015 03:03:36 +0000 (22:03 -0500)
committerJerome St-Louis <jerome@ecere.com>
Tue, 22 Dec 2015 06:45:14 +0000 (01:45 -0500)
- Avoid costly mouse position lookups when not needed when creating large amounts of windows at once
  (Useful for EDA Report System)

ecere/src/gui/Window.ec
eda/libeda/src/ers.ec

index cfb1b54..836cdcb 100644 (file)
@@ -3602,7 +3602,7 @@ private:
 
    void ConsequentialMouseMove(bool kbMoving)
    {
-      if(rootWindow)
+      if(rootWindow && !noConsequential)
       {
          if(kbMoving || !guiApp.windowMoving)
          {
@@ -6462,7 +6462,7 @@ public:
                         }
                      }
 
-                     if(!destroyed)
+                     if(!destroyed && !noConsequential)
                         rootWindow.ConsequentialMouseMove(false);
 
                      result = true;
@@ -9788,6 +9788,7 @@ private:
       bool manageDisplay:1;
       bool formDesigner:1; // True if we this is running in the form editor
       bool requireRemaximize:1;
+      bool noConsequential:1;
    };
 
    // Checks used internally for them not to take effect in FormDesigner
@@ -9812,6 +9813,12 @@ private:
          }
       }
    }
+
+   public property bool noConsequential
+   {
+      set { noConsequential = value; }
+      get { return noConsequential; }
+   }
 };
 
 public class CommonControl : Window
index c5a513d..8f63484 100644 (file)
@@ -36,7 +36,7 @@ static define dpi = 100;
 class PreviewPage : Window
 {
    background = dimGray;
-
+   noConsequential = true;
    public property Page page
    {
       set
@@ -111,7 +111,7 @@ public:
       get { return report; }
    }
 
-   Window inside { this };
+   Window inside { this, noConsequential = true };
 
    int headerHeight;
 
@@ -956,5 +956,8 @@ public:
    bool isLast;
    int level;
 
+   creationActivation = doNothing;
+   noConsequential = true;
+
    subclass(Detail) rowDetail;
 }