TechDraw: Use freecad_cast whenever possible
This commit is contained in:
committed by
Benjamin Nauck
parent
4bd2cdeb2a
commit
b999ce0336
@@ -112,7 +112,7 @@ DrawViewDimension* DrawDimHelper::makeExtentDim(DrawViewPart* dvp, std::vector<s
|
||||
Base::Interpreter().runStringArg(
|
||||
"App.activeDocument().%s.DirExtent = %d", dimName.c_str(), dimNum);
|
||||
|
||||
auto* dimExt = dynamic_cast<DrawViewDimExtent*>(doc->getObject(dimName.c_str()));
|
||||
auto* dimExt = freecad_cast<DrawViewDimExtent*>(doc->getObject(dimName.c_str()));
|
||||
if (!dimExt) {
|
||||
throw Base::TypeError("Dim extent not found");
|
||||
}
|
||||
@@ -174,7 +174,7 @@ void DrawDimHelper::makeExtentDim3d(DrawViewPart* dvp, ReferenceVector reference
|
||||
Base::Interpreter().runStringArg(
|
||||
"App.activeDocument().%s.DirExtent = %d", dimName.c_str(), dimNum);
|
||||
|
||||
auto* dimExt = dynamic_cast<DrawViewDimExtent*>(doc->getObject(dimName.c_str()));
|
||||
auto* dimExt = freecad_cast<DrawViewDimExtent*>(doc->getObject(dimName.c_str()));
|
||||
if (!dimExt) {
|
||||
throw Base::TypeError("Dim extent not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user