summaryrefslogtreecommitdiff
path: root/src/gui/outfitwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/outfitwindow.cpp')
-rw-r--r--src/gui/outfitwindow.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index b00ab69b9..45ee8465f 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -443,11 +443,10 @@ void OutfitWindow::mousePressed(gcn::MouseEvent &event)
}
else
{
- Item *const selected = dragDrop.getSelected();
- if (selected)
+ if (dragDrop.isSelected())
{
- mItems[mCurrentOutfit][index] = selected->getId();
- mItemColors[mCurrentOutfit][index] = selected->getColor();
+ mItems[mCurrentOutfit][index] = dragDrop.getSelected();
+ mItemColors[mCurrentOutfit][index] = dragDrop.getSelectedColor();
dragDrop.deselect();
}
}
@@ -475,14 +474,10 @@ void OutfitWindow::mouseReleased(gcn::MouseEvent &event)
event.consume();
if (!dragDrop.isEmpty())
{
- Item *const item = dragDrop.getItem();
- if (item)
- {
- mItems[mCurrentOutfit][index] = item->getId();
- mItemColors[mCurrentOutfit][index] = item->getColor();
- dragDrop.clear();
- dragDrop.deselect();
- }
+ mItems[mCurrentOutfit][index] = dragDrop.getItem();
+ mItemColors[mCurrentOutfit][index] = dragDrop.getItemColor();
+ dragDrop.clear();
+ dragDrop.deselect();
}
if (mItemClicked)
mItemClicked = false;