Fix handling of Scale change in DrawViewSymbol classes
This commit is contained in:
@@ -121,7 +121,8 @@ App::DocumentObjectExecReturn *DrawViewArch::execute(void)
|
||||
SourceName.c_str(),paramStr.str().c_str());
|
||||
Base::Interpreter().runStringArg("App.activeDocument().%s.Symbol = '%s' + svgBody + '%s'",
|
||||
FeatName.c_str(),svgHead.c_str(),svgTail.c_str());
|
||||
}
|
||||
}
|
||||
requestPaint();
|
||||
return DrawView::execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ App::DocumentObjectExecReturn *DrawViewDraft::execute(void)
|
||||
Base::Interpreter().runStringArg("App.activeDocument().%s.Symbol = '%s' + svgBody + '%s'",
|
||||
FeatName.c_str(),svgHead.c_str(),svgTail.c_str());
|
||||
}
|
||||
requestPaint();
|
||||
return DrawView::execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ void DrawViewSymbol::onChanged(const App::Property* prop)
|
||||
tbegin = twhat[0].second;
|
||||
}
|
||||
EditableTexts.setValues(eds);
|
||||
requestPaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,6 +120,7 @@ App::DocumentObjectExecReturn *DrawViewSymbol::execute(void)
|
||||
|
||||
}
|
||||
Symbol.setValue(newsvg);
|
||||
requestPaint();
|
||||
return DrawView::execute();
|
||||
}
|
||||
|
||||
@@ -160,6 +162,20 @@ bool DrawViewSymbol::checkFit(TechDraw::DrawPage* p) const
|
||||
return result;
|
||||
}
|
||||
|
||||
short DrawViewSymbol::mustExecute() const
|
||||
{
|
||||
short result = 0;
|
||||
if (!isRestoring()) {
|
||||
result = (Scale.isTouched() ||
|
||||
EditableTexts.isTouched());
|
||||
}
|
||||
if ((bool) result) {
|
||||
return result;
|
||||
}
|
||||
return DrawView::mustExecute();
|
||||
}
|
||||
|
||||
|
||||
PyObject *DrawViewSymbol::getPyObject(void)
|
||||
{
|
||||
if (PythonObject.is(Py::_None())) {
|
||||
|
||||
@@ -63,6 +63,8 @@ public:
|
||||
//return PyObject as DrawViewSymbolPy
|
||||
virtual PyObject *getPyObject(void);
|
||||
|
||||
virtual short mustExecute() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void onChanged(const App::Property* prop) override;
|
||||
|
||||
Reference in New Issue
Block a user