Created attachment 133374 [details] screenshot showing unselected widgets STEPS TO REPRODUCE 1. start umbrello 2. add a sequence diagram 3. add objects and messages 4. select objects and messages OBSERVED RESULT After processing the tasks in step 4. multiple times, selection markers are not removed although the related widget is unselected. EXPECTED RESULT The selection markers should be removed if a widget is unselected SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE_Leap 15.1 KDE Frameworks Version: 5.55 Qt Version: 5.9.7 ADDITIONAL INFORMATION This problem can be reproduced with builds from git master and the release/20.12 branch, but not with builds from the release/20.08 branch, which means that the cause is a change in the master branch. This problem should be fixed before release 20.12.0.
As far as I experimented, the sticking markers only seem to happen on the operation FloatingTexts of MessageWidgets. Also when the sticking happens, QGraphicsObjectWrapper::itemChange() no longer fires (at least not for change == ItemSelectedChange && scene()); only UMLWidget::mousePressEvent() continues to get triggered. Could it be that we have competition between QGraphicsObjectWrapper::itemChange and UMLWidget::mousePressEvent ?
Git commit 87abeac31e59542eb60c1f08c2a0d4abfa29237a by Oliver Kellogg. Committed on 21/11/2020 at 23:07. Pushed by okellogg into branch 'master'. umbrello/umlwidgets/umlwidget.cpp : Proposed fix for bug 429181 - In functions mousePressEvent and mouseReleaseEvent, on calling m_scene->selectedCount() leave argument filterText at default value (false). Reason: On distinguishing single vs multi selection all selected FloatingTexts shall be considered. - In function mouseReleaseEvent handling of m_resized == true call deselect(event). M +3 -2 umbrello/umlwidgets/umlwidget.cpp https://invent.kde.org/sdk/umbrello/commit/87abeac31e59542eb60c1f08c2a0d4abfa29237a
As far as I experimented, commit https://invent.kde.org/sdk/umbrello/commit/87abeac31e59542eb60c1f08c2a0d4abfa29237a fixes the problem. However, it is hard to test all possible usage scenarios of diagram object selection. I appreciate your verification.
Git commit 97ed260f37ad4040bf9b78db1c1259a4b5d82022 by Oliver Kellogg. Committed on 22/11/2020 at 20:15. Pushed by okellogg into branch 'master'. umbrello/umlscene.cpp followup to commit 87abeac fix for bug 429181 - In function clearSelected iterate over selectedItems() for calling WidgetBase::setSelected(false) on each item. M +7 -0 umbrello/umlscene.cpp https://invent.kde.org/sdk/umbrello/commit/97ed260f37ad4040bf9b78db1c1259a4b5d82022