aboutsummaryrefslogtreecommitdiff
path: root/gui/dialog.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-01-02 01:31:46 +0000
committerJohannes Schickel2009-01-02 01:31:46 +0000
commite7bf64744b13b86cce707cc4de3516cd8723c90e (patch)
tree3b85753e33e1efca6ce5788520ec609753f08960 /gui/dialog.cpp
parente6b9a3e4763f7802cbc5b7f7c12f12c5995ee23c (diff)
downloadscummvm-rg350-e7bf64744b13b86cce707cc4de3516cd8723c90e.tar.gz
scummvm-rg350-e7bf64744b13b86cce707cc4de3516cd8723c90e.tar.bz2
scummvm-rg350-e7bf64744b13b86cce707cc4de3516cd8723c90e.zip
Got rid of GuiManager::clearDragWidget instead handle it via a new widget flag WIDGET_IGNORE_DRAG.
svn-id: r35662
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r--gui/dialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index ebfdb9d634..9fd9d19fac 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -152,7 +152,8 @@ void Dialog::handleMouseDown(int x, int y, int button, int clickCount) {
w = findWidget(x, y);
- _dragWidget = w;
+ if (w && !(w->getFlags() & WIDGET_IGNORE_DRAG))
+ _dragWidget = w;
// If the click occured inside a widget which is not the currently
// focused one, change the focus to that widget.
@@ -184,7 +185,10 @@ void Dialog::handleMouseUp(int x, int y, int button, int clickCount) {
}
}
- w = _dragWidget;
+ if (_dragWidget)
+ w = _dragWidget;
+ else
+ w = findWidget(x, y);
if (w)
w->handleMouseUp(x - (w->getAbsX() - _x), y - (w->getAbsY() - _y), button, clickCount);