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

@@ -70,27 +70,25 @@ DrawViewArch::~DrawViewArch()
{
}
void DrawViewArch::onChanged(const App::Property* prop)
short DrawViewArch::mustExecute() const
{
short result = 0;
if (!isRestoring()) {
if (prop == &Source ||
prop == &AllOn ||
prop == &RenderMode ||
prop == &ShowHidden ||
prop == &ShowFill ||
prop == &LineWidth ||
prop == &FontSize) {
try {
App::DocumentObjectExecReturn *ret = recompute();
delete ret;
}
catch (...) {
}
}
result = (Source.isTouched() ||
AllOn.isTouched() ||
RenderMode.isTouched() ||
ShowHidden.isTouched() ||
ShowFill.isTouched() ||
LineWidth.isTouched() ||
FontSize.isTouched());
}
TechDraw::DrawViewSymbol::onChanged(prop);
if ((bool) result) {
return result;
}
return DrawViewSymbol::mustExecute();
}
App::DocumentObjectExecReturn *DrawViewArch::execute(void)
{
if (!keepUpdated()) {
@@ -123,7 +121,7 @@ App::DocumentObjectExecReturn *DrawViewArch::execute(void)
Base::Interpreter().runStringArg("App.activeDocument().%s.Symbol = '%s' + svgBody + '%s'",
FeatName.c_str(),svgHead.c_str(),svgTail.c_str());
}
requestPaint();
// requestPaint();
return DrawView::execute();
}