[TD]minor py fixes

This commit is contained in:
wandererfan
2020-05-10 08:18:46 -04:00
committed by WandererFan
parent d7659c7741
commit 25fc5137d6
3 changed files with 7 additions and 4 deletions

View File

@@ -57,7 +57,7 @@
<!-- </Attribute> -->
<Attribute Name="Format">
<Documentation>
<UserDocu>The appearance attributes (style, color, weight, visible) for this CosmeticEdge.</UserDocu>
<UserDocu>The appearance attributes (style, weight, color, visible) for this CosmeticEdge.</UserDocu>
</Documentation>
<Parameter Name="Format" Type="Object"/>
</Attribute>

View File

@@ -45,7 +45,10 @@ using namespace TechDraw;
// returns a string which represents the object e.g. when printed in python
std::string CosmeticEdgePy::representation(void) const
{
return "<CosmeticEdge object>";
std::stringstream ss;
ss << "<CosmeticEdge object> at " << std::hex << this;
return ss.str();
// return "<CosmeticEdge object>";
}
PyObject *CosmeticEdgePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper

View File

@@ -669,7 +669,7 @@ App::Color DrawUtil::pyTupleToColor(PyObject* pColor)
{
// Base::Console().Message("DU::pyTupleToColor()\n");
double red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0;
App::Color c(red, blue, green, alpha);
App::Color c(red, green, blue, alpha);
if (PyTuple_Check(pColor)) {
int tSize = (int) PyTuple_Size(pColor);
if (tSize > 2) {
@@ -684,7 +684,7 @@ App::Color DrawUtil::pyTupleToColor(PyObject* pColor)
PyObject* pAlpha = PyTuple_GetItem(pColor,3);
alpha = PyFloat_AsDouble(pAlpha);
}
c = App::Color(red, blue, green, alpha);
c = App::Color(red, green, blue, alpha);
}
return c;
}