aboutsummaryrefslogtreecommitdiffstats
path: root/gui/designwidget.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-09-25 13:55:54 +0100
committerDavid Shah <davey1576@gmail.com>2018-09-25 13:55:54 +0100
commit09ddcb67d33f61c186bdb21fd8db9bb9b175d2f0 (patch)
treeed91200f442a8512f14ce7969d9017019814b721 /gui/designwidget.cc
parent1d782870dcdadf144a29ff4f256261fc35b882bd (diff)
downloadnextpnr-09ddcb67d33f61c186bdb21fd8db9bb9b175d2f0.tar.gz
nextpnr-09ddcb67d33f61c186bdb21fd8db9bb9b175d2f0.tar.bz2
nextpnr-09ddcb67d33f61c186bdb21fd8db9bb9b175d2f0.zip
gui: Fix another zero-decal issue
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'gui/designwidget.cc')
-rw-r--r--gui/designwidget.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc
index 6f00edf5..34f151a8 100644
--- a/gui/designwidget.cc
+++ b/gui/designwidget.cc
@@ -846,7 +846,9 @@ void DesignWidget::onHoverPropertyChanged(QtBrowserItem *item)
if (value!=IdString()) {
auto node = treeModel->nodeForIdType(type, value);
if (node) {
- Q_EMIT hover(getDecals((*node)->type(), (*node)->id()).at(0));
+ std::vector<DecalXY> decals = getDecals((*node)->type(), (*node)->id());
+ if (decals.size()>0)
+ Q_EMIT hover(decals.at(0));
return;
}
}