Skip to content

Commit

Permalink
[Sketcher] Update string comparison from C to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
Syres916 authored Nov 16, 2024
1 parent 38bf51c commit e05286c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Mod/Sketcher/App/SketchObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4626,11 +4626,16 @@ bool SketchObject::isCarbonCopyAllowed(App::Document* pDoc, App::DocumentObject*
if (rsn)
*rsn = rlAllowed;

std::string sketchArchType ("Sketcher::SketchObjectPython");

// Only applicable to sketches
if (pObj->getTypeId() != Sketcher::SketchObject::getClassTypeId()) {
if (rsn)
*rsn = rlNotASketch;
return false;
if (pObj->getTypeId() != Sketcher::SketchObject::getClassTypeId() ) {
if (sketchArchType.compare(pObj->getTypeId().getName()) != 0) {
if (rsn) {
*rsn = rlNotASketch;
}
return false;
}
}

SketchObject* psObj = static_cast<SketchObject*>(pObj);
Expand Down

0 comments on commit e05286c

Please sign in to comment.