Ignore selection changes while closing Page
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user