[TD]minor py fixes
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user