In this code:
void DiagramWindow::increaseSize()
{
QList<QGraphicsItem *> items = scene->selectedItems();
if (items.count() == 1) {
Node *selNode = dynamic_cast<Node *>(items.first());
selNode->increaseSize();
}
return;
}
void DiagramWindow::increaseSize()
{
QList<QGraphicsItem *> items = scene->selectedItems();
if (items.count() == 1) {
Node *selNode = dynamic_cast<Node *>(items.first());
selNode->increaseSize();
}
return;
}
To copy to clipboard, switch view to plain text mode
What happens if the selected node is a child of another node? I think in that case, both nodes will be marked as selected so your count will be 2, not 1. Have you looked at the size of the count in the cases where "works" and "doesn't work"?
Bookmarks