diff options
author | David Shah <davey1576@gmail.com> | 2018-09-25 13:31:54 +0100 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-09-25 13:31:54 +0100 |
commit | 1d782870dcdadf144a29ff4f256261fc35b882bd (patch) | |
tree | a694a5a354c09f5cbda7fa7be6d431c8c61021d5 | |
parent | e7fe046e571aa007fcb2e10af0a097b839bfef0c (diff) | |
download | nextpnr-1d782870dcdadf144a29ff4f256261fc35b882bd.tar.gz nextpnr-1d782870dcdadf144a29ff4f256261fc35b882bd.tar.bz2 nextpnr-1d782870dcdadf144a29ff4f256261fc35b882bd.zip |
Apply GUI fix from @mmicko
Signed-off-by: David Shah <davey1576@gmail.com>
-rw-r--r-- | gui/designwidget.cc | 4 |
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;
}
}
|