summaryrefslogtreecommitdiff
path: root/src/dragdrop.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-01 14:20:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-01 14:24:08 +0300
commit69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9 (patch)
treea9c8835f20ef4f118181f97166bc7a52a1e48314 /src/dragdrop.h
parentc65c2a8130c7748a2b8eee03ff716bd9db699d79 (diff)
downloadmanaverse-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.tar.gz
manaverse-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.tar.bz2
manaverse-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.tar.xz
manaverse-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.zip
clear drag selection if selected item removed.
Diffstat (limited to 'src/dragdrop.h')
-rw-r--r--src/dragdrop.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h
index 5630f9248..a2c94facf 100644
--- a/src/dragdrop.h
+++ b/src/dragdrop.h
@@ -80,6 +80,14 @@ class DragDrop
Item *getSelected()
{ return mSelItem; }
+ void clearItem(const Item *const item)
+ {
+ if (mItem == item)
+ clear();
+ if (mSelItem == item)
+ mSelItem = nullptr;
+ }
+
private:
Item *mItem;
Item *mSelItem;