diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-01 14:20:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-01 14:24:08 +0300 |
commit | 69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9 (patch) | |
tree | a9c8835f20ef4f118181f97166bc7a52a1e48314 /src/dragdrop.h | |
parent | c65c2a8130c7748a2b8eee03ff716bd9db699d79 (diff) | |
download | manaplus-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.tar.gz manaplus-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.tar.bz2 manaplus-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.tar.xz manaplus-69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9.zip |
clear drag selection if selected item removed.
Diffstat (limited to 'src/dragdrop.h')
-rw-r--r-- | src/dragdrop.h | 8 |
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; |