PyObject* wxPyDrawXXXList(wxDC& dc, wxPyDrawListOp_t doDraw,
PyObject* pyCoords, PyObject* pyPens, PyObject* pyBrushes)
{
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
bool isFastSeq = PyList_Check(pyCoords) || PyTuple_Check(pyCoords);
bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
exit:
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return retval;
}
PyObject* wxPyDrawTextList(wxDC& dc, PyObject* textList, PyObject* pyPoints, PyObject* foregroundList, PyObject* backgroundList)
{
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
bool isFastSeq = PyList_Check(pyPoints) || PyTuple_Check(pyPoints);
bool isFastText = PyList_Check(textList) || PyTuple_Check(textList);
else {
obj = PySequence_GetItem(foregroundList, i);
}
- if (! wxPyConvertSwigPtr(obj, (void **) &color, wxT("wxColour_p"))) {
+ if (! wxPyConvertSwigPtr(obj, (void **) &color, wxT("wxColour"))) {
if (!isFastForeground)
Py_DECREF(obj);
goto err2;
goto exit;
exit:
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return retval;
}