It is necessary to check the previous state of the enable flag. SALOME unconditionally call ClearSelection by the enable selection state change if the new state is false.
void NewGeom_SalomeViewer::enableSelection(bool isEnabled)
{
if (mySelector)
- mySelector->viewer()->enableSelection(isEnabled);
+ if (mySelector->viewer()->isSelectionEnabled() != isEnabled)
+ mySelector->viewer()->enableSelection(isEnabled);
// The enableSelection() in SALOME 7.5 cause of forced Viewer update(we have blinking)
// After this is corrected, the first row should be recommented, the last - removed
//mySelector->viewer()->setInteractionStyle(isEnabled ? SUIT_ViewModel::STANDARD