Part: [skip ci] fix crash when closing document while face colors panel is open
This commit is contained in:
@@ -972,11 +972,14 @@ void SelectionSingleton::rmvSelectionGate(void)
|
||||
{
|
||||
if (ActiveGate) {
|
||||
delete ActiveGate;
|
||||
ActiveGate=0;
|
||||
ActiveGate = nullptr;
|
||||
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
if (doc) {
|
||||
// if a document is about to be closed it has no MDI view any more
|
||||
Gui::MDIView* mdi = doc->getActiveView();
|
||||
mdi->restoreOverrideCursor();
|
||||
if (mdi)
|
||||
mdi->restoreOverrideCursor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
# include <TopTools_IndexedMapOfShape.hxx>
|
||||
# include <QFontMetrics>
|
||||
# include <QMessageBox>
|
||||
# include <QPointer>
|
||||
# include <QSet>
|
||||
# include <Python.h>
|
||||
# include <Inventor/SoPickedPoint.h>
|
||||
@@ -97,7 +98,7 @@ class FaceColors::Private
|
||||
public:
|
||||
typedef boost::signals2::connection Connection;
|
||||
Ui_TaskFaceColors* ui;
|
||||
Gui::View3DInventorViewer* view;
|
||||
QPointer<Gui::View3DInventorViewer> view;
|
||||
ViewProviderPartExt* vp;
|
||||
App::DocumentObject* obj;
|
||||
Gui::Document* doc;
|
||||
|
||||
Reference in New Issue
Block a user