[TD]code review changes for Gui

This commit is contained in:
Wanderer Fan
2022-08-18 16:45:40 -04:00
committed by WandererFan
parent e80c42e8f1
commit a1cc69c8e3
5 changed files with 87 additions and 77 deletions

View File

@@ -334,8 +334,7 @@ void ViewProviderPage::removeMDIView(void)
{
if (!m_mdiView.isNull()) { //m_mdiView is a QPointer
QList<QWidget*> wList= Gui::getMainWindow()->windows();
bool found = wList.contains(m_mdiView);
if (found) {
if (wList.contains(m_mdiView)) {
Gui::getMainWindow()->removeWindow(m_mdiView);
m_mdiView = nullptr; //m_mdiView will eventually be deleted and
m_graphicsView = nullptr; //will take m_graphicsView with it