From c65c2a8130c7748a2b8eee03ff716bd9db699d79 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 1 Jun 2013 14:08:03 +0300 Subject: Restore adding items to outfits and drops by clicking only. --- src/gui/widgets/dropshortcutcontainer.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/dropshortcutcontainer.cpp') diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index fcd708bdc..aa4e1d829 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -207,7 +207,20 @@ void DropShortcutContainer::mousePressed(gcn::MouseEvent &event) if (event.getButton() == gcn::MouseEvent::LEFT) { - mItemClicked = true; + if (dropShortcut->getItem(index) > 0) + { + mItemClicked = true; + } + else + { + Item *const selected = dragDrop.getSelected(); + if (selected) + { + dropShortcut->setItems(index, selected->getId(), + selected->getColor()); + dragDrop.deselect(); + } + } } else if (event.getButton() == gcn::MouseEvent::RIGHT) { @@ -246,6 +259,7 @@ void DropShortcutContainer::mouseReleased(gcn::MouseEvent &event) { dropShortcut->setItems(index, item->getId(), item->getColor()); dragDrop.clear(); + dragDrop.deselect(); } } -- cgit v1.2.3-60-g2f50