summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-14 20:50:08 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-14 22:54:59 +0300
commit0204a75a049d6819719cf41ac92116012ed50d86 (patch)
treed2723719f22628a612c17b0f977054610c5720fd /src/gui/widgets/itemshortcutcontainer.cpp
parent3fc421539bc81f27262b91554694509f3e47f865 (diff)
downloadplus-0204a75a049d6819719cf41ac92116012ed50d86.tar.gz
plus-0204a75a049d6819719cf41ac92116012ed50d86.tar.bz2
plus-0204a75a049d6819719cf41ac92116012ed50d86.tar.xz
plus-0204a75a049d6819719cf41ac92116012ed50d86.zip
Allow drag cast type from skills window into shortcuts.
Diffstat (limited to 'src/gui/widgets/itemshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 7b6df7644..60519699e 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -432,12 +432,15 @@ void ItemShortcutContainer::mouseDragged(MouseEvent &event)
= skillDialog->getSkillByItem(itemId);
if (skill)
{
+ const std::string itemData = selShortcut->getItemData(
+ index);
selShortcut->removeItem(index);
dragDrop.dragSkill(skill,
DragDropSource::Shortcuts,
index);
dragDrop.setItem(itemId);
dragDrop.setItemColor(itemColor);
+ dragDrop.setItemData(itemData);
}
else
{
@@ -522,6 +525,8 @@ void ItemShortcutContainer::mouseReleased(MouseEvent &event)
}
else
{
+ selShortcut->setItemData(index,
+ dragDrop.getItemData());
selShortcut->setItem(index, dragDrop.getItem(),
dragDrop.getItemColor());
}