[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

This commit is contained in:
mwganson
2021-09-07 12:55:20 -05:00
parent 64775bf91f
commit c4367add4a

View File

@@ -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);
}
}