Merge pull request #5013 from mwganson/techdraw
[TechDraw] prevent crash where user duplicates page without also dupl…
This commit is contained in:
@@ -481,7 +481,11 @@ void MDIViewPage::fixOrphans(bool force)
|
||||
m_view->removeQView(qv);
|
||||
} else {
|
||||
TechDraw::DrawPage* pp = qv->getViewObject()->findParentPage();
|
||||
if (thisPage != pp) {
|
||||
/** avoid crash where a view might have more than one parent page
|
||||
* if the user duplicated the page without duplicating dependencies
|
||||
*/
|
||||
int numParentPages = qv->getViewObject()->countParentPages();
|
||||
if (thisPage != pp && numParentPages == 1) {
|
||||
m_view->removeQView(qv);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user