| 458 | } |
| 459 | |
| 460 | int FeaturePythonImp::isElementVisible(const char* element) const |
| 461 | { |
| 462 | _FC_PY_CALL_CHECK(isElementVisible, return (-2)); |
| 463 | Base::PyGILStateLocker lock; |
| 464 | try { |
| 465 | Py::Tuple args(2); |
| 466 | args.setItem(0, Py::Object(object->getPyObject(), true)); |
| 467 | args.setItem(1, Py::String(element ? element : "")); |
| 468 | return Py::Long(Base::pyCall(py_isElementVisible.ptr(), args.ptr())); |
| 469 | } |
| 470 | catch (Py::Exception&) { |
| 471 | if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) { |
| 472 | PyErr_Clear(); |
| 473 | return -2; |
| 474 | } |
| 475 | Base::PyException e; // extract the Python error text |
| 476 | e.reportException(); |
| 477 | return -1; |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | int FeaturePythonImp::setElementVisible(const char* element, bool visible) |
| 482 | { |
no test coverage detected