Keep track of synchronized MxN windows to avoid nodes being hidden
Summary: This problem was caused by the QmitkSynchronizedWidgetConnector not being notified of changes in the Data Manager. The Connector is only informed via synchronized QmitkSynchronizedNodeSelectionWidgets. When no selection widget is synchronized, new nodes are not added to the internal selection of the QmitkSynchronizedWidgetConnector. Thus, when a selection widget is newly synchronized, this internal selection is outdated, missing the new nodes, which are therefore set invisible. To take care of this, I added a counter of active connections. When there are no synchronized selection widgets anymore, the connector is automatically set to "Select All", and actually sets to selection widget to select all (appropriate) nodes instead of the internal selection. Fixes T30184
Test Plan: With all MxN windows set to not-synchronized, add a new node (e.g. load an image or create a segmentation), and turn on synchronization of a window. The newly added node should be visible and its visibility not changed.
Reviewers: O3 MITK Reviewer Group II, floca
Reviewed By: O3 MITK Reviewer Group II, floca
Subscribers: floca
Maniphest Tasks: T30184
Differential Revision: https://phabricator.mitk.org/D879