From c4367add4a3ca54e013f1cb9d1eab60c5b81f615 Mon Sep 17 00:00:00 2001 From: mwganson Date: Tue, 7 Sep 2021 12:55:20 -0500 Subject: [PATCH] [TechDraw] prevent crash where user has duplicated page without dependencies and then tries to remove a view from one of the pages by editing the Views property --- src/Mod/TechDraw/Gui/MDIViewPage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/TechDraw/Gui/MDIViewPage.cpp b/src/Mod/TechDraw/Gui/MDIViewPage.cpp index 13ae474eeb..e1ab9539cf 100644 --- a/src/Mod/TechDraw/Gui/MDIViewPage.cpp +++ b/src/Mod/TechDraw/Gui/MDIViewPage.cpp @@ -485,7 +485,7 @@ void MDIViewPage::fixOrphans(bool force) * if the user duplicated the page without duplicating dependencies */ int numParentPages = qv->getViewObject()->countParentPages(); - if (thisPage != pp && numParentPages == 1) { + if (thisPage != pp && numParentPages == 0) { m_view->removeQView(qv); } }