Fix non-Delete of Graphic on DocObject delete

- While the source document obj was "removing", the
  graphic was being deleted and readded by the view
  provider.
This commit is contained in:
wandererfan
2019-04-18 12:17:33 -04:00
committed by WandererFan
parent d379a83221
commit 02da48cac8
6 changed files with 55 additions and 45 deletions

View File

@@ -66,6 +66,7 @@ DrawViewSymbol::~DrawViewSymbol()
void DrawViewSymbol::onChanged(const App::Property* prop)
{
// Base::Console().Message("DVS::onChanged(%s) \n",prop->getName());
if (prop == &Symbol) {
if (!isRestoring()) {
//this pulls the initial values from svg into editabletexts
@@ -83,7 +84,7 @@ void DrawViewSymbol::onChanged(const App::Property* prop)
tbegin = twhat[0].second;
}
EditableTexts.setValues(eds);
requestPaint();
// requestPaint();
}
}
}
@@ -92,6 +93,7 @@ void DrawViewSymbol::onChanged(const App::Property* prop)
App::DocumentObjectExecReturn *DrawViewSymbol::execute(void)
{
// Base::Console().Message("DVS::execute() \n");
if (!keepUpdated()) {
return App::DocumentObject::StdReturn;
}
@@ -120,7 +122,7 @@ App::DocumentObjectExecReturn *DrawViewSymbol::execute(void)
}
Symbol.setValue(newsvg);
requestPaint();
// requestPaint();
return DrawView::execute();
}