Fix #2692 TaskProjectGroup cancel button
This commit is contained in:
@@ -14,6 +14,41 @@ std::string DrawViewCollectionPy::representation(void) const
|
||||
{
|
||||
return std::string("<DrawViewCollection object>");
|
||||
}
|
||||
PyObject* DrawViewCollectionPy::addView(PyObject* args)
|
||||
{
|
||||
PyObject *pcDocObj;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O!", &(App::DocumentObjectPy::Type), &pcDocObj)) {
|
||||
Base::Console().Error("Error: DrawViewClipPy::addView - Bad Arg - not DocumentObject\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DrawViewCollection* collect = getDrawViewCollectionPtr();
|
||||
DrawViewPy* pyView = static_cast<TechDraw::DrawViewPy*>(pcDocObj);
|
||||
DrawView* view = pyView->getDrawViewPtr(); //get DrawView for pyView
|
||||
|
||||
int i = collect->addView(view);
|
||||
|
||||
return PyInt_FromLong((long) i);
|
||||
}
|
||||
|
||||
PyObject* DrawViewCollectionPy::removeView(PyObject* args)
|
||||
{
|
||||
PyObject *pcDocObj;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O!", &(App::DocumentObjectPy::Type), &pcDocObj)) {
|
||||
Base::Console().Error("Error: DrawViewClipPy::addView - Bad Arg - not DocumentObject\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DrawViewCollection* collect = getDrawViewCollectionPtr();
|
||||
DrawViewPy* pyView = static_cast<TechDraw::DrawViewPy*>(pcDocObj);
|
||||
DrawView* view = pyView->getDrawViewPtr(); //get DrawView for pyView
|
||||
|
||||
int i = collect->removeView(view);
|
||||
|
||||
return PyInt_FromLong((long) i);
|
||||
}
|
||||
|
||||
|
||||
PyObject *DrawViewCollectionPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
Reference in New Issue
Block a user