py3: ported Measure and TechDraw

This commit is contained in:
Yorik van Havre
2016-10-01 17:25:45 -03:00
committed by wmayer
parent a0aa4fdfef
commit 5590acdfa5
10 changed files with 99 additions and 34 deletions

View File

@@ -50,7 +50,11 @@ PyObject* DrawSVGTemplatePy::getEditFieldContent(PyObject* args)
}
std::string content = getDrawSVGTemplatePtr()->EditableTexts[fieldName];
if (!content.empty()) {
#if PY_MAJOR_VERSION < 3
result = PyString_FromString(content.c_str());
#else
result = PyUnicode_FromString(content.c_str());
#endif
}
return result;
}