From 3020c1689e306b81df963f6f366712b4f4e73f1f Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Tue, 8 Dec 2015 22:03:36 -0500 Subject: [PATCH] ecere/gui/Window; EDA/ERS: New 'noConsequential' property to address performance issues - 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 | 11 +++++++++-- eda/libeda/src/ers.ec | 7 +++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ecere/src/gui/Window.ec b/ecere/src/gui/Window.ec index cfb1b54..836cdcb 100644 --- a/ecere/src/gui/Window.ec +++ b/ecere/src/gui/Window.ec @@ -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 diff --git a/eda/libeda/src/ers.ec b/eda/libeda/src/ers.ec index c5a513d..8f63484 100644 --- a/eda/libeda/src/ers.ec +++ b/eda/libeda/src/ers.ec @@ -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; } -- 1.8.3.1