[aseprite] 245/308: Fix performance problem when we change color sliders with mouse movement

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:45:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 802b8a0a10c5b4610d82fe14f997ed486a812e3b
Author: David Capello <davidcapello at gmail.com>
Date:   Wed Feb 17 18:32:34 2016 -0300

    Fix performance problem when we change color sliders with mouse movement
---
 src/ui/widget.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/ui/widget.cpp b/src/ui/widget.cpp
index 6fcb431..fe34114 100644
--- a/src/ui/widget.cpp
+++ b/src/ui/widget.cpp
@@ -617,11 +617,13 @@ void Widget::setBounds(const Rect& rc)
 
 void Widget::setBoundsQuietly(const gfx::Rect& rc)
 {
-  m_bounds = rc;
+  if (m_bounds != rc) {
+    m_bounds = rc;
 
-  // Remove all paint messages for this widget.
-  if (Manager* manager = this->manager())
-    manager->removeMessagesFor(this, kPaintMessage);
+    // Remove all paint messages for this widget.
+    if (Manager* manager = this->manager())
+      manager->removeMessagesFor(this, kPaintMessage);
+  }
 
   invalidate();
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list