nodeview: worked around qt issue where the selection signal would still be sent after an item was deleted

This commit is contained in:
itsmattkc
2020-03-17 00:34:32 +11:00
parent 1c192100c2
commit 72eb3a5d82
3 changed files with 32 additions and 10 deletions
+2 -10
View File
@@ -104,20 +104,12 @@ void NodeView::DeleteSelected()
void NodeView::SelectAll()
{
QList<QGraphicsItem *> all_items = this->items();
foreach (QGraphicsItem* i, all_items) {
i->setSelected(true);
}
scene_.SelectAll();
}
void NodeView::DeselectAll()
{
QList<QGraphicsItem *> selected_items = scene_.selectedItems();
foreach (QGraphicsItem* i, selected_items) {
i->setSelected(false);
}
scene_.DeselectAll();
}
void NodeView::Select(const QList<Node *> &nodes)