MULTIPR_GUI::MULTIPR_GUI()
: SalomeApp_Module("MULTIPR"),
- mMULTIPRObj(NULL),
+ //mMULTIPRObj(NULL),
mMEDFileName(""),
mProgress(NULL)
{
MULTIPR_GUI::~MULTIPR_GUI()
{
- if (mMULTIPRObj != NULL)
+ //if (mMULTIPRObj != NULL)
+ if (!CORBA::is_nil(mMULTIPRObj))
{
CORBA::release(mMULTIPRObj);
}
{
setMenuShown(false);
setToolShown(false);
-
+
// Unset actions accelerator keys
action(ACTION_IMPORT_MED)->setAccel(QKeySequence());
-
+
+ mMULTIPRObj = MULTIPR_ORB::MULTIPR_Obj::_nil();
+
return SalomeApp_Module::deactivateModule(theStudy);
}
-
+
void MULTIPR_GUI::windows(QMap<int, int>& theMap) const
{
theMap.clear();
QApplication::setOverrideCursor(Qt::waitCursor);
// Delete previous MULTIPR object.
- if (mMULTIPRObj != NULL)
+ //if (mMULTIPRObj != NULL)
+ if (!CORBA::is_nil(mMULTIPRObj) && !mMULTIPRObj->_non_existent())
{
mMULTIPRObj->reset();
}
}
QApplication::restoreOverrideCursor();
- if (mMULTIPRObj != NULL)
+ //if (mMULTIPRObj != NULL)
+ if (!CORBA::is_nil(mMULTIPRObj))
{
SALOMEDS::SObject_ptr aSObject = SALOMEDS::SObject::_nil();
SalomeApp_Study* aSAStudy = dynamic_cast<SalomeApp_Study*>(getApp()->activeStudy());
void MULTIPR_GUI::OnPartition1()
{
// check if MULTIPRObj exists
- if (mMULTIPRObj == NULL)
+ //if (mMULTIPRObj == NULL)
+ if (CORBA::is_nil(mMULTIPRObj))
{
return;
}
void MULTIPR_GUI::OnPartition2()
{
// check if MULTIPRObj exists
- if (mMULTIPRObj == NULL)
+ //if (mMULTIPRObj == NULL)
+ if (CORBA::is_nil(mMULTIPRObj))
{
return;
}
void MULTIPR_GUI::OnDecimate()
{
// check if MULTIPRObj exists
- if (mMULTIPRObj == NULL)
+ //if (mMULTIPRObj == NULL)
+ if (CORBA::is_nil(mMULTIPRObj))
{
return;
}
void MULTIPR_GUI::OnRemove()
{
// check if MULTIPRObj exists
- if (mMULTIPRObj == NULL)
+ //if (mMULTIPRObj == NULL)
+ if (CORBA::is_nil(mMULTIPRObj))
{
return;
}
void MULTIPR_GUI::OnSave()
{
// check if MULTIPRObj exists
- if (mMULTIPRObj == NULL)
+ //if (mMULTIPRObj == NULL)
+ if (CORBA::is_nil(mMULTIPRObj))
{
return;
}
bool MULTIPR_GUI::isPartExist(const char* partName)
{
- if (mMULTIPRObj == NULL) return false;
+ //if (mMULTIPRObj == NULL) return false;
+ if (CORBA::is_nil(mMULTIPRObj)) return false;
MULTIPR_ORB::string_array* listParts = mMULTIPRObj->getParts();
for (int i=0 ; i<listParts->length() ; i++)