summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-03 16:00:30 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-03 16:00:30 +0300
commit7f8fd01cdd56b322c19e58c19d483fb32fb05cb5 (patch)
tree0330b2853c3a5222ca6aea2d8d4c769ac47a2e31 /src/gui/widgets
parent2eb15d389f85e300cb124b990ebbf2663acaa637 (diff)
downloadplus-7f8fd01cdd56b322c19e58c19d483fb32fb05cb5.tar.gz
plus-7f8fd01cdd56b322c19e58c19d483fb32fb05cb5.tar.bz2
plus-7f8fd01cdd56b322c19e58c19d483fb32fb05cb5.tar.xz
plus-7f8fd01cdd56b322c19e58c19d483fb32fb05cb5.zip
fix drag and drop inside some windows.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp17
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp2
3 files changed, 15 insertions, 6 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 8078347f7..f74db990b 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -252,13 +252,18 @@ void DropShortcutContainer::mouseReleased(gcn::MouseEvent &event)
dragDrop.clear();
return;
}
- if (!dragDrop.isEmpty() && dragDrop.getSource()
- == DRAGDROP_SOURCE_INVENTORY)
+ if (!dragDrop.isEmpty())
{
- dropShortcut->setItems(index, dragDrop.getItem(),
- dragDrop.getItemColor());
- dragDrop.clear();
- dragDrop.deselect();
+ DragDropSource src = dragDrop.getSource();
+ if (src == DRAGDROP_SOURCE_INVENTORY
+ || src == DRAGDROP_SOURCE_OUTFIT
+ || src == DRAGDROP_SOURCE_DROP)
+ {
+ dropShortcut->setItems(index, dragDrop.getItem(),
+ dragDrop.getItemColor());
+ dragDrop.clear();
+ dragDrop.deselect();
+ }
}
mItemClicked = false;
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index ec0776f36..517c783a0 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -386,6 +386,8 @@ void ItemShortcutContainer::mouseReleased(gcn::MouseEvent &event)
selShortcut->setItem(index, dragDrop.getItem(),
dragDrop.getItemColor());
}
+ dragDrop.clear();
+ dragDrop.deselect();
}
mItemClicked = false;
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index dad7f5dcf..436f0c583 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -245,6 +245,8 @@ void SpellShortcutContainer::mouseReleased(gcn::MouseEvent &event)
{
spellManager->swap(idx + index, idx + oldIndex);
spellManager->save();
+ dragDrop.clear();
+ dragDrop.deselect();
}
}
}