Ignore selection changes while closing Page

This commit is contained in:
wandererfan
2018-05-26 20:40:09 -04:00
parent 37c4bda776
commit ce99d383fb
2 changed files with 9 additions and 2 deletions

View File

@@ -223,13 +223,19 @@ void MDIViewPage::setDocumentObject(const std::string& name)
m_objectName = name;
}
void MDIViewPage::setDocumentName(const std::string& name)
{
m_documentName = name;
}
void MDIViewPage::closeEvent(QCloseEvent* ev)
{
MDIView::closeEvent(ev);
if (!ev->isAccepted())
return;
detachSelection();
blockSelection(true);
// when closing the view from GUI notify the view provider to mark it invisible
if (_pcDocument && !m_objectName.empty()) {
App::Document* doc = _pcDocument->getDocument();