From 0b44672a83c505d0e073ba095e2283e60a4016ce Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 3 Jul 2013 18:41:44 +0300 Subject: simplify drag and drop source check. --- src/gui/outfitwindow.cpp | 5 +---- src/gui/widgets/dropshortcutcontainer.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index a95d6fe2f..e1c36fd90 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -473,10 +473,7 @@ void OutfitWindow::mouseReleased(gcn::MouseEvent &event) event.consume(); if (!dragDrop.isEmpty()) { - DragDropSource src = dragDrop.getSource(); - if (src == DRAGDROP_SOURCE_INVENTORY - || src == DRAGDROP_SOURCE_OUTFIT - || src == DRAGDROP_SOURCE_DROP) + if (dragDrop.isSourceItemContainer()) { mItems[mCurrentOutfit][index] = dragDrop.getItem(); mItemColors[mCurrentOutfit][index] = dragDrop.getItemColor(); diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp index f74db990b..e26183116 100644 --- a/src/gui/widgets/dropshortcutcontainer.cpp +++ b/src/gui/widgets/dropshortcutcontainer.cpp @@ -254,10 +254,7 @@ void DropShortcutContainer::mouseReleased(gcn::MouseEvent &event) } if (!dragDrop.isEmpty()) { - DragDropSource src = dragDrop.getSource(); - if (src == DRAGDROP_SOURCE_INVENTORY - || src == DRAGDROP_SOURCE_OUTFIT - || src == DRAGDROP_SOURCE_DROP) + if (dragDrop.isSourceItemContainer()) { dropShortcut->setItems(index, dragDrop.getItem(), dragDrop.getItemColor()); -- cgit v1.2.3-70-g09d2