aboutsummaryrefslogtreecommitdiffstats
path: root/gui/designwidget.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-09-25 13:31:54 +0100
committerDavid Shah <davey1576@gmail.com>2018-09-25 13:31:54 +0100
commit1d782870dcdadf144a29ff4f256261fc35b882bd (patch)
treea694a5a354c09f5cbda7fa7be6d431c8c61021d5 /gui/designwidget.cc
parente7fe046e571aa007fcb2e10af0a097b839bfef0c (diff)
downloadnextpnr-1d782870dcdadf144a29ff4f256261fc35b882bd.tar.gz
nextpnr-1d782870dcdadf144a29ff4f256261fc35b882bd.tar.bz2
nextpnr-1d782870dcdadf144a29ff4f256261fc35b882bd.zip
Apply GUI fix from @mmicko
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 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;
}
}