Change removeWindow logic for consistency

- Page window is removed in two places.  Problem with
  display of 3D window when Page window closed was fixed
  by  http://github.com/FreeCAD/FreeCAD/commit/1d83d17.
  This commit makes the code for Page object delete
  consistent, but doesn't fix the problem with display
  of 3D window.
This commit is contained in:
WandererFan
2018-02-11 09:15:21 -05:00
committed by wmayer
parent 7349a66cf9
commit 83806936c9

View File

@@ -171,7 +171,9 @@ bool ViewProviderPage::onDelete(const std::vector<std::string> &items)
{
if (!m_mdiView.isNull()) {
Gui::getMainWindow()->removeWindow(m_mdiView);
Gui::getMainWindow()->activatePreviousWindow();
// Gui::getMainWindow()->activatePreviousWindow(); //changed for consistency. see comment in hide() above.
//note: doesn't fix problem here.
//3d view is still not maximized after page is deleted.
m_mdiView->deleteLater(); // Delete the drawing m_mdiView;
} else {
// MDIViewPage is not displayed yet so don't try to delete it!