[Measure] Fix Lint Feedback
This commit is contained in:
@@ -61,14 +61,15 @@ void StdCmdMeasure::activated(int iMsg)
|
||||
}
|
||||
|
||||
bool StdCmdMeasure::isActive() {
|
||||
App::Document *doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc || doc->countObjectsOfType(App::GeoFeature::getClassTypeId()) == 0)
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc || doc->countObjectsOfType(App::GeoFeature::getClassTypeId()) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Gui::MDIView *view = Gui::getMainWindow()->activeWindow();
|
||||
if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) {
|
||||
Gui::View3DInventorViewer *viewer =
|
||||
static_cast<Gui::View3DInventor *>(view)->getViewer();
|
||||
dynamic_cast<Gui::View3DInventor *>(view)->getViewer();
|
||||
return !viewer->isEditing();
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user