fix crash when cancelling revolution task panel

This commit is contained in:
wmayer
2017-01-23 23:24:40 +01:00
parent 5aac8e3b13
commit 4dcb8d64d8
3 changed files with 24 additions and 8 deletions

View File

@@ -45,7 +45,17 @@ TaskFeatureParameters::TaskFeatureParameters(PartDesignGui::ViewProvider *vp, QW
const std::string& pixmapname, const QString& parname)
: TaskBox(Gui::BitmapFactory().pixmap(pixmapname.c_str()),parname,true, parent),
vp(vp), blockUpdate(false)
{ }
{
Gui::Document* doc = vp->getDocument();
this->attachDocument(doc);
this->enableNotifications(DocumentObserver::Delete);
}
void TaskFeatureParameters::slotDeletedObject(const Gui::ViewProviderDocumentObject& Obj)
{
if (this->vp == &Obj)
this->vp = nullptr;
}
void TaskFeatureParameters::onUpdateView(bool on)
{