Skip to content

Fixed pqLiveInsituManager managers map not updated after closing Catalyst session via the Disconnect button (Connect grayed out bug)

Amine Mzoughi requested to merge embeddedmz/paraview:bug-fixes into master

After closing a catalyst session via the disconnect button, it is not possible to create a new one : in Catalyst Menu the connect entry is disabled (grayed out - even if we click on the builtin item of the pipeline browser).

The method that update the connect entry's enable status is "void pqCatalystConnectReaction::updateEnableState()". Inside it, "!pqLiveInsituManager::instance()->isDisplayServer(server)" doesn't give a correct result after the catalyst session is disconnected via the "Disconnect" button. I fixed that bug by updating pqLiveInsituManager's managers map when a session (pqServer) is about to be deleted.

Also, pqCatalystConnectReaction will be notified when a session is removed so it can update the catalyst menu's connect entry's enable status.

There's still something missing, after removing the catalyst session via "Disconnect", the active session is, therefore, a null pointer. So, the connect entry is still grayed out. To fix that one can click on the "builtin:" of the pipeline browser.

Here's why, pqActiveObjects has a slot serverRemoved(pqServer*) connected to SM Qt model's signal serverRemoved(pqServer*). In that slot, the active session is allowed to be null (null pointer). That's why I didn't want to modify that slot so that builtin become the active session.

Anyway, with this commit, it's better than before.

Merge request reports