Core: Import STEP: Cancel button does not cancel (#16499)
* Fix importing .step file when user cancelled import settings dialog * Refactor object loading python code, fix not using settings when STEP options dialog not shown * Use custom exception type for user cancelling import instead of `RuntimeError` * Pull python code out to external file
This commit is contained in:
@@ -427,6 +427,10 @@ void Application::setupPythonException(PyObject* module)
|
||||
Base::PyExc_FC_PropertyError = PyErr_NewException("Base.PropertyError", PyExc_AttributeError, nullptr);
|
||||
Py_INCREF(Base::PyExc_FC_PropertyError);
|
||||
PyModule_AddObject(module, "PropertyError", Base::PyExc_FC_PropertyError);
|
||||
|
||||
Base::PyExc_FC_AbortIOException = PyErr_NewException("Base.PyExc_FC_AbortIOException", PyExc_BaseException, nullptr);
|
||||
Py_INCREF(Base::PyExc_FC_AbortIOException);
|
||||
PyModule_AddObject(module, "AbortIOException", Base::PyExc_FC_AbortIOException);
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user