Coverity issues:

129097
129098
129099
129101
129102
129132
129134
129203
This commit is contained in:
wmayer
2016-08-16 16:34:51 +02:00
parent 1134ab9747
commit 683f943d38
6 changed files with 24 additions and 13 deletions

View File

@@ -812,13 +812,13 @@ void StdCmdToggleSelectability::activated(int iMsg)
for (std::vector<App::DocumentObject*>::const_iterator ft=sel.begin();ft!=sel.end();++ft) {
ViewProvider *pr = pcDoc->getViewProviderByName((*ft)->getNameInDocument());
if(pr->isDerivedFrom(ViewProviderGeometryObject::getClassTypeId())){
if (dynamic_cast<ViewProviderGeometryObject*>(pr)->Selectable.getValue())
doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Selectable=False"
, (*it)->getName(), (*ft)->getNameInDocument());
else
doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Selectable=True"
, (*it)->getName(), (*ft)->getNameInDocument());
if (pr->isDerivedFrom(ViewProviderGeometryObject::getClassTypeId())){
if (static_cast<ViewProviderGeometryObject*>(pr)->Selectable.getValue())
doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Selectable=False"
, (*it)->getName(), (*ft)->getNameInDocument());
else
doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Selectable=True"
, (*it)->getName(), (*ft)->getNameInDocument());
}
}
}