summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 2a65a57c1..ac2916c1d 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -214,11 +214,10 @@ void DropShortcutContainer::mousePressed(gcn::MouseEvent &event)
}
else
{
- Item *const selected = dragDrop.getSelected();
- if (selected)
+ if (dragDrop.isSelected())
{
- dropShortcut->setItems(index, selected->getId(),
- selected->getColor());
+ dropShortcut->setItems(index, dragDrop.getSelected(),
+ dragDrop.getSelectedColor());
dragDrop.deselect();
}
}
@@ -255,13 +254,10 @@ void DropShortcutContainer::mouseReleased(gcn::MouseEvent &event)
}
if (!dragDrop.isEmpty())
{
- Item *const item = dragDrop.getItem();
- if (item)
- {
- dropShortcut->setItems(index, item->getId(), item->getColor());
- dragDrop.clear();
- dragDrop.deselect();
- }
+ dropShortcut->setItems(index, dragDrop.getItem(),
+ dragDrop.getItemColor());
+ dragDrop.clear();
+ dragDrop.deselect();
}
mItemClicked = false;