mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
0022221: [CEA 819] Error "'NoneType' object is not callable" at Salome closure
This commit is contained in:
parent
ab30aac8c8
commit
39b656bb9f
@ -116,6 +116,8 @@
|
|||||||
|
|
||||||
#include <VTKViewer_Algorithm.h>
|
#include <VTKViewer_Algorithm.h>
|
||||||
|
|
||||||
|
#include <PyInterp_Interp.h>
|
||||||
|
|
||||||
#include <SUIT_Desktop.h>
|
#include <SUIT_Desktop.h>
|
||||||
#include <SUIT_FileDlg.h>
|
#include <SUIT_FileDlg.h>
|
||||||
#include <SUIT_MessageBox.h>
|
#include <SUIT_MessageBox.h>
|
||||||
@ -4603,18 +4605,17 @@ bool SMESHGUI::activateModule( SUIT_Study* study )
|
|||||||
|
|
||||||
// import Python module that manages SMESH plugins (need to be here because SalomePyQt API uses active module)
|
// import Python module that manages SMESH plugins (need to be here because SalomePyQt API uses active module)
|
||||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
PyObject* pluginsmanager=PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
PyObjWrapper pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
||||||
if(pluginsmanager==NULL)
|
if ( !pluginsmanager ) {
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
else
|
}
|
||||||
{
|
else {
|
||||||
PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"smesh",tr("MEN_MESH").toStdString().c_str(),tr("SMESH_PLUGINS_OTHER").toStdString().c_str());
|
PyObjWrapper result = PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"smesh",tr("MEN_MESH").toStdString().c_str(),tr("SMESH_PLUGINS_OTHER").toStdString().c_str());
|
||||||
if(result==NULL)
|
if ( !result )
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
Py_XDECREF(result);
|
}
|
||||||
}
|
|
||||||
PyGILState_Release(gstate);
|
PyGILState_Release(gstate);
|
||||||
// end of GEOM plugins loading
|
// end of SMESH plugins loading
|
||||||
|
|
||||||
// Reset actions accelerator keys
|
// Reset actions accelerator keys
|
||||||
//action(111)->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B)); // Import DAT
|
//action(111)->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B)); // Import DAT
|
||||||
|
Loading…
Reference in New Issue
Block a user