[TechDraw] Improve readability of DrawRichAnno.cpp
This commit is contained in:
committed by
WandererFan
parent
b2bb479788
commit
88b52bd00d
@@ -71,18 +71,15 @@ void DrawRichAnno::onChanged(const App::Property* prop)
|
||||
requestPaint();
|
||||
}
|
||||
}
|
||||
|
||||
DrawView::onChanged(prop);
|
||||
|
||||
}
|
||||
|
||||
short DrawRichAnno::mustExecute() const
|
||||
{
|
||||
bool result = 0;
|
||||
if (!isRestoring()) {
|
||||
result = (AnnoText.isTouched());
|
||||
}
|
||||
if (result) {
|
||||
return result;
|
||||
if (!isRestoring() && AnnoText.isTouched()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return DrawView::mustExecute();
|
||||
@@ -100,15 +97,7 @@ App::DocumentObjectExecReturn *DrawRichAnno::execute(void)
|
||||
DrawView* DrawRichAnno::getBaseView(void) const
|
||||
{
|
||||
// Base::Console().Message("DRA::getBaseView() - %s\n", getNameInDocument());
|
||||
DrawView* result = nullptr;
|
||||
App::DocumentObject* baseObj = AnnoParent.getValue();
|
||||
if (baseObj) {
|
||||
DrawView* cast = dynamic_cast<DrawView*>(baseObj);
|
||||
if (cast) {
|
||||
result = cast;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return dynamic_cast<DrawView*>(AnnoParent.getValue());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user