mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 07:40:34 +05:00
Provide correct static variable <aFilterManager> management to avoid problems, appering if SMESHGUI is loaded from python script before module activation via GUI
This commit is contained in:
parent
b22f47d357
commit
5aed93b518
@ -824,6 +824,7 @@ SalomeApp_Module( "SMESH" )
|
||||
SMESHGUI::~SMESHGUI()
|
||||
{
|
||||
SMESH::GetFilterManager()->Destroy();
|
||||
SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -1041,7 +1041,7 @@ void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed()
|
||||
tr("ERROR_OF_DELETING"), QMessageBox::Ok);
|
||||
} else {
|
||||
myCurrFilterName = "";
|
||||
myCurrFilterName = -1;
|
||||
myCurrFilter = -1;
|
||||
myListBox->removeItem(anIndex);
|
||||
|
||||
if (anIndex >= 1)
|
||||
|
@ -22,13 +22,15 @@
|
||||
|
||||
#include "SMESHGUI.h"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
namespace SMESH
|
||||
{
|
||||
SMESH::FilterManager_var GetFilterManager()
|
||||
SMESH::FilterManager_var& GetFilterManager()
|
||||
{
|
||||
static SMESH::FilterManager_var aFilterManager;
|
||||
if (CORBA::is_nil(aFilterManager)){
|
||||
aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
|
||||
if (CORBA::is_nil(aFilterManager)) {
|
||||
aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
|
||||
}
|
||||
return aFilterManager;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
namespace SMESH{
|
||||
|
||||
SMESH::FilterManager_var GetFilterManager();
|
||||
SMESH::FilterManager_var& GetFilterManager();
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user