mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 21:20: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()
|
SMESHGUI::~SMESHGUI()
|
||||||
{
|
{
|
||||||
SMESH::GetFilterManager()->Destroy();
|
SMESH::GetFilterManager()->Destroy();
|
||||||
|
SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -1041,7 +1041,7 @@ void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed()
|
|||||||
tr("ERROR_OF_DELETING"), QMessageBox::Ok);
|
tr("ERROR_OF_DELETING"), QMessageBox::Ok);
|
||||||
} else {
|
} else {
|
||||||
myCurrFilterName = "";
|
myCurrFilterName = "";
|
||||||
myCurrFilterName = -1;
|
myCurrFilter = -1;
|
||||||
myListBox->removeItem(anIndex);
|
myListBox->removeItem(anIndex);
|
||||||
|
|
||||||
if (anIndex >= 1)
|
if (anIndex >= 1)
|
||||||
|
@ -22,13 +22,15 @@
|
|||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
|
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
namespace SMESH
|
namespace SMESH
|
||||||
{
|
{
|
||||||
SMESH::FilterManager_var GetFilterManager()
|
SMESH::FilterManager_var& GetFilterManager()
|
||||||
{
|
{
|
||||||
static SMESH::FilterManager_var aFilterManager;
|
static SMESH::FilterManager_var aFilterManager;
|
||||||
if (CORBA::is_nil(aFilterManager)){
|
if (CORBA::is_nil(aFilterManager)) {
|
||||||
aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
|
aFilterManager = SMESHGUI::GetSMESHGen()->CreateFilterManager();
|
||||||
}
|
}
|
||||||
return aFilterManager;
|
return aFilterManager;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
namespace SMESH{
|
namespace SMESH{
|
||||||
|
|
||||||
SMESH::FilterManager_var GetFilterManager();
|
SMESH::FilterManager_var& GetFilterManager();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user