aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/designwidget.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc
index c49df085..6f00edf5 100644
--- a/gui/designwidget.cc
+++ b/gui/designwidget.cc
@@ -827,7 +827,9 @@ void DesignWidget::onHoverIndexChanged(QModelIndex index)
if (index.isValid()) {
TreeModel::Item *item = treeModel->nodeFromIndex(index);
if (item->type() != ElementType::NONE) {
- Q_EMIT hover(getDecals(item->type(), item->id()).at(0));
+ std::vector<DecalXY> decals = getDecals(item->type(), item->id());
+ if (decals.size()>0)
+ Q_EMIT hover(decals.at(0));
return;
}
}