[aseprite] 23/308: Fix bug destroying ShadeWidgets of Select type
Tobias Hansen
thansen at moszumanska.debian.org
Tue Mar 8 02:44:48 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 c33e63bed7c74f4d2a8649c3ce2f510a744dbeb3
Author: David Capello <davidcapello at gmail.com>
Date: Thu Nov 26 20:09:53 2015 -0300
Fix bug destroying ShadeWidgets of Select type
We don't need to listen the ColorBar in shade widgets that are used
in the menu popup.
---
src/app/ui/context_bar.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/app/ui/context_bar.cpp b/src/app/ui/context_bar.cpp
index 4de167c..67cf0f7 100644
--- a/src/app/ui/context_bar.cpp
+++ b/src/app/ui/context_bar.cpp
@@ -37,6 +37,7 @@
#include "app/ui/skin/style.h"
#include "app/ui_context.h"
#include "base/bind.h"
+#include "base/connection.h"
#include "base/scoped_value.h"
#include "base/unique_ptr.h"
#include "doc/brush.h"
@@ -536,8 +537,10 @@ class ContextBar::InkShadesField : public HBox {
switch (msg->type()) {
case kOpenMessage:
- ColorBar::instance()->ChangeSelection.connect(
- Bind<void>(&ShadeWidget::onChangeColorBarSelection, this));
+ if (m_click == DragAndDrop) {
+ m_conn = ColorBar::instance()->ChangeSelection.connect(
+ Bind<void>(&ShadeWidget::onChangeColorBarSelection, this));
+ }
break;
case kSetCursorMessage:
@@ -710,6 +713,7 @@ class ContextBar::InkShadesField : public HBox {
int m_dragIndex;
bool m_dropBefore;
int m_boxSize;
+ ScopedConnection m_conn;
};
public:
--
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