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();

View File

@@ -86,6 +86,7 @@ public:
bool getFrameState(void) {return m_frameState;};
void setDocumentObject(const std::string&);
void setDocumentName(const std::string&);
PyObject* getPyObject();
QGVPage* getQGVPage(void) {return m_view;};
@@ -98,7 +99,6 @@ public:
void redrawAllViews(void);
void redraw1View(TechDraw::DrawView* dv);
public Q_SLOTS:
void setRenderer(QAction *action);
void viewAll();
@@ -135,6 +135,7 @@ private:
QAction *m_highQualityAntialiasingAction;
std::string m_objectName;
std::string m_documentName;
bool isSelectionBlocked;
QGVPage *m_view;