summaryrefslogtreecommitdiff
path: root/src/dragdrop.h
diff options
context:
space:
mode:
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;