Setting bool member variable that blocks sub window activation slot temporarily at the correct places - the main window methods that sets active viewer and removes a viewer.
2b881f2cb8