Revolution: fix crash when selecting stuff during task

This commit is contained in:
DeepSOIC 2015-06-24 14:45:21 +03:00 committed by Stefan Tröger
parent 8aecb00a8d
commit 36fe5994b9
2 changed files with 4 additions and 2 deletions

View File

@ -1060,7 +1060,7 @@ void SketchBased::getAxis(const App::DocumentObject *pcReferenceAxis, const std:
throw Base::Exception("Rotation axis must not be perpendicular with the sketch plane");
}
else if (pcReferenceAxis->getTypeId().isDerivedFrom(PartDesign::Feature::getClassTypeId())) {
if (subReferenceAxis[0].empty())
if (subReferenceAxis.empty())
throw Base::Exception("No rotation axis reference specified");
const Part::Feature* refFeature = static_cast<const Part::Feature*>(pcReferenceAxis);
Part::TopoShape refShape = refFeature->Shape.getShape();

View File

@ -156,9 +156,11 @@ const QString getRefStr(const App::DocumentObject* obj, const std::vector<std::s
if (PartDesign::Feature::isDatum(obj))
return QString::fromAscii(obj->getNameInDocument());
else
else if (sub.size()>0)
return QString::fromAscii(obj->getNameInDocument()) + QString::fromAscii(":") +
QString::fromAscii(sub.front().c_str());
else
return QString();
}
const std::string getPythonStr(const App::DocumentObject* obj, const std::vector<std::string>& sub)