mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-27 23:10:33 +05:00
0023164: Problem with Dump Study in case of an import
- Fix problem caused by unhandled memory leaks
This commit is contained in:
parent
c749922c02
commit
1b44f73640
@ -36,10 +36,13 @@
|
|||||||
#include "GEOM_Operation.h"
|
#include "GEOM_Operation.h"
|
||||||
#include "GEOMBase.h"
|
#include "GEOMBase.h"
|
||||||
#include "GEOM_Displayer.h"
|
#include "GEOM_Displayer.h"
|
||||||
|
#include "GEOM_GenericObjPtr.h"
|
||||||
|
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_SERVER_HEADER(BREPPlugin)
|
#include CORBA_SERVER_HEADER(BREPPlugin)
|
||||||
|
|
||||||
|
typedef GEOM::GenericObjPtr<GEOM::IBREPOperations> BREPOpPtr;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : BREPPlugin_GUI()
|
// function : BREPPlugin_GUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
@ -111,8 +114,8 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
||||||
GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
|
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( brepOp ) ) return false;
|
if ( brepOp.isNull() ) return false;
|
||||||
|
|
||||||
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
||||||
tr( "BREP_FILES" ),
|
tr( "BREP_FILES" ),
|
||||||
@ -126,7 +129,7 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
|
|||||||
foreach( QString fileName, fileNames )
|
foreach( QString fileName, fileNames )
|
||||||
{
|
{
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
GEOM_Operation transaction( app, brepOp.in() );
|
GEOM_Operation transaction( app, brepOp.get() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -145,6 +148,7 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
|
|||||||
entryList.append( so->GetID() );
|
entryList.append( so->GetID() );
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
GEOM_Displayer( study ).Display( main.in() );
|
GEOM_Displayer( study ).Display( main.in() );
|
||||||
|
main->UnRegister();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -183,8 +187,8 @@ bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
|
||||||
GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
|
BREPOpPtr brepOp = GEOM::IBREPOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( brepOp ) ) return false;
|
if ( brepOp.isNull() ) return false;
|
||||||
|
|
||||||
LightApp_SelectionMgr* sm = app->selectionMgr();
|
LightApp_SelectionMgr* sm = app->selectionMgr();
|
||||||
if ( !sm ) return false;
|
if ( !sm ) return false;
|
||||||
@ -212,7 +216,7 @@ bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
|
|
||||||
GEOM_Operation transaction( app, brepOp.in() );
|
GEOM_Operation transaction( app, brepOp.get() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -37,10 +37,13 @@
|
|||||||
#include "GEOM_Operation.h"
|
#include "GEOM_Operation.h"
|
||||||
#include "GEOMBase.h"
|
#include "GEOMBase.h"
|
||||||
#include "GEOM_Displayer.h"
|
#include "GEOM_Displayer.h"
|
||||||
|
#include "GEOM_GenericObjPtr.h"
|
||||||
|
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_SERVER_HEADER(IGESPlugin)
|
#include CORBA_SERVER_HEADER(IGESPlugin)
|
||||||
|
|
||||||
|
typedef GEOM::GenericObjPtr<GEOM::IIGESOperations> IGESOpPtr;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : IGESPlugin_GUI()
|
// function : IGESPlugin_GUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
@ -109,8 +112,8 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
|
||||||
GEOM::IIGESOperations_var igesOp = GEOM::IIGESOperations::_narrow( op );
|
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( igesOp ) ) return false;
|
if ( igesOp.isNull() ) return false;
|
||||||
|
|
||||||
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
||||||
tr( "IGES_FILES" ),
|
tr( "IGES_FILES" ),
|
||||||
@ -126,7 +129,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
|
|||||||
{
|
{
|
||||||
QString fileName = fileNames.at( i );
|
QString fileName = fileNames.at( i );
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
GEOM_Operation transaction( app, igesOp.in() );
|
GEOM_Operation transaction( app, igesOp.get() );
|
||||||
bool ignoreUnits = false;
|
bool ignoreUnits = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -182,6 +185,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
|
|||||||
entryList.append( so->GetID() );
|
entryList.append( so->GetID() );
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
GEOM_Displayer( study ).Display( main.in() );
|
GEOM_Displayer( study ).Display( main.in() );
|
||||||
|
main->UnRegister();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -221,8 +225,8 @@ bool IGESPlugin_GUI::exportIGES( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
|
||||||
GEOM::IIGESOperations_var igesOp = GEOM::IIGESOperations::_narrow( op );
|
IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( igesOp ) ) return false;
|
if ( igesOp.isNull() ) return false;
|
||||||
|
|
||||||
LightApp_SelectionMgr* sm = app->selectionMgr();
|
LightApp_SelectionMgr* sm = app->selectionMgr();
|
||||||
if ( !sm ) return false;
|
if ( !sm ) return false;
|
||||||
@ -251,7 +255,7 @@ bool IGESPlugin_GUI::exportIGES( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
|
|
||||||
GEOM_Operation transaction( app, igesOp.in() );
|
GEOM_Operation transaction( app, igesOp.get() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -36,10 +36,13 @@
|
|||||||
#include "GEOM_Operation.h"
|
#include "GEOM_Operation.h"
|
||||||
#include "GEOMBase.h"
|
#include "GEOMBase.h"
|
||||||
#include "GEOM_Displayer.h"
|
#include "GEOM_Displayer.h"
|
||||||
|
#include "GEOM_GenericObjPtr.h"
|
||||||
|
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_SERVER_HEADER(STEPPlugin)
|
#include CORBA_SERVER_HEADER(STEPPlugin)
|
||||||
|
|
||||||
|
typedef GEOM::GenericObjPtr<GEOM::ISTEPOperations> STEPOpPtr;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : STEPPlugin_GUI()
|
// function : STEPPlugin_GUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
@ -111,8 +114,8 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
|
||||||
GEOM::ISTEPOperations_var stepOp = GEOM::ISTEPOperations::_narrow( op );
|
STEPOpPtr stepOp = GEOM::ISTEPOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( stepOp ) ) return false;
|
if ( stepOp.isNull() ) return false;
|
||||||
|
|
||||||
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
||||||
tr( "STEP_FILES" ),
|
tr( "STEP_FILES" ),
|
||||||
@ -128,7 +131,7 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
|
|||||||
{
|
{
|
||||||
QString fileName = fileNames.at( i );
|
QString fileName = fileNames.at( i );
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
GEOM_Operation transaction( app, stepOp.in() );
|
GEOM_Operation transaction( app, stepOp.get() );
|
||||||
bool ignoreUnits = false;
|
bool ignoreUnits = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -189,6 +192,7 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
|
|||||||
}
|
}
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
GEOM_Displayer( study ).Display( main.in() );
|
GEOM_Displayer( study ).Display( main.in() );
|
||||||
|
main->UnRegister();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -228,8 +232,8 @@ bool STEPPlugin_GUI::exportSTEP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
|
||||||
GEOM::ISTEPOperations_var stepOp = GEOM::ISTEPOperations::_narrow( op );
|
STEPOpPtr stepOp = GEOM::ISTEPOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( stepOp ) ) return false;
|
if ( stepOp.isNull() ) return false;
|
||||||
|
|
||||||
LightApp_SelectionMgr* sm = app->selectionMgr();
|
LightApp_SelectionMgr* sm = app->selectionMgr();
|
||||||
if ( !sm ) return false;
|
if ( !sm ) return false;
|
||||||
@ -257,7 +261,7 @@ bool STEPPlugin_GUI::exportSTEP( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
|
|
||||||
GEOM_Operation transaction( app, stepOp.in() );
|
GEOM_Operation transaction( app, stepOp.get() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -37,10 +37,13 @@
|
|||||||
#include "GEOM_Operation.h"
|
#include "GEOM_Operation.h"
|
||||||
#include "GEOMBase.h"
|
#include "GEOMBase.h"
|
||||||
#include "GEOM_Displayer.h"
|
#include "GEOM_Displayer.h"
|
||||||
|
#include "GEOM_GenericObjPtr.h"
|
||||||
|
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_SERVER_HEADER(STLPlugin)
|
#include CORBA_SERVER_HEADER(STLPlugin)
|
||||||
|
|
||||||
|
typedef GEOM::GenericObjPtr<GEOM::ISTLOperations> STLOpPtr;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : STLPlugin_GUI()
|
// function : STLPlugin_GUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
@ -109,8 +112,8 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
|
||||||
GEOM::ISTLOperations_var stlOp = GEOM::ISTLOperations::_narrow( op );
|
STLOpPtr stlOp = GEOM::ISTLOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( stlOp ) ) return false;
|
if ( stlOp.isNull() ) return false;
|
||||||
|
|
||||||
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
|
||||||
tr( "STL_FILES" ),
|
tr( "STL_FILES" ),
|
||||||
@ -124,7 +127,7 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
|
|||||||
foreach( QString fileName, fileNames )
|
foreach( QString fileName, fileNames )
|
||||||
{
|
{
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
GEOM_Operation transaction( app, stlOp.in() );
|
GEOM_Operation transaction( app, stlOp.get() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -143,6 +146,7 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
|
|||||||
entryList.append( so->GetID() );
|
entryList.append( so->GetID() );
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
GEOM_Displayer( study ).Display( main.in() );
|
GEOM_Displayer( study ).Display( main.in() );
|
||||||
|
main->UnRegister();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -181,8 +185,8 @@ bool STLPlugin_GUI::exportSTL( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
|
||||||
GEOM::ISTLOperations_var stlOp = GEOM::ISTLOperations::_narrow( op );
|
STLOpPtr stlOp = GEOM::ISTLOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( stlOp ) ) return false;
|
if ( stlOp.isNull() ) return false;
|
||||||
|
|
||||||
LightApp_SelectionMgr* sm = app->selectionMgr();
|
LightApp_SelectionMgr* sm = app->selectionMgr();
|
||||||
if ( !sm ) return false;
|
if ( !sm ) return false;
|
||||||
@ -215,7 +219,7 @@ bool STLPlugin_GUI::exportSTL( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
|
|
||||||
GEOM_Operation transaction( app, stlOp.in() );
|
GEOM_Operation transaction( app, stlOp.get() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -35,10 +35,13 @@
|
|||||||
#include "GEOM_Operation.h"
|
#include "GEOM_Operation.h"
|
||||||
#include "GEOMBase.h"
|
#include "GEOMBase.h"
|
||||||
#include "GEOM_Displayer.h"
|
#include "GEOM_Displayer.h"
|
||||||
|
#include "GEOM_GenericObjPtr.h"
|
||||||
|
|
||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_SERVER_HEADER(VTKPlugin)
|
#include CORBA_SERVER_HEADER(VTKPlugin)
|
||||||
|
|
||||||
|
typedef GEOM::GenericObjPtr<GEOM::IVTKOperations> VTKOpPtr;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : VTKPlugin_GUI()
|
// function : VTKPlugin_GUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
@ -102,8 +105,8 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
|
||||||
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "VTKPluginEngine" );
|
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "VTKPluginEngine" );
|
||||||
GEOM::IVTKOperations_var stlOp = GEOM::IVTKOperations::_narrow( op );
|
VTKOpPtr vtkOp = GEOM::IVTKOperations::_narrow( op );
|
||||||
if ( CORBA::is_nil( stlOp ) ) return false;
|
if ( vtkOp.isNull() ) return false;
|
||||||
|
|
||||||
LightApp_SelectionMgr* sm = app->selectionMgr();
|
LightApp_SelectionMgr* sm = app->selectionMgr();
|
||||||
if ( !sm ) return false;
|
if ( !sm ) return false;
|
||||||
@ -132,16 +135,16 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
|
|||||||
|
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
|
|
||||||
GEOM_Operation transaction( app, stlOp.in() );
|
GEOM_Operation transaction( app, vtkOp.get() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
|
app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
|
||||||
transaction.start();
|
transaction.start();
|
||||||
|
|
||||||
stlOp->ExportVTK( obj, fileName.toUtf8().constData(), deflection );
|
vtkOp->ExportVTK( obj, fileName.toUtf8().constData(), deflection );
|
||||||
|
|
||||||
if ( stlOp->IsDone() )
|
if ( vtkOp->IsDone() )
|
||||||
{
|
{
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
}
|
}
|
||||||
@ -150,7 +153,7 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
|
|||||||
transaction.abort();
|
transaction.abort();
|
||||||
SUIT_MessageBox::critical( parent,
|
SUIT_MessageBox::critical( parent,
|
||||||
tr( "GEOM_ERROR" ),
|
tr( "GEOM_ERROR" ),
|
||||||
tr( "GEOM_PRP_ABORT" ) + "\n" + tr( stlOp->GetErrorCode() ) );
|
tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -280,13 +280,16 @@ bool XAOPlugin_ImportDlg::execute()
|
|||||||
{
|
{
|
||||||
QStringList anEntryList;
|
QStringList anEntryList;
|
||||||
anEntryList << addInStudy(m_mainShape, m_mainShape->GetName());
|
anEntryList << addInStudy(m_mainShape, m_mainShape->GetName());
|
||||||
|
m_mainShape->UnRegister();
|
||||||
for (int i = 0; i < subShapes->length(); i++)
|
for (int i = 0; i < subShapes->length(); i++)
|
||||||
{
|
{
|
||||||
addInStudy(subShapes[i].in(), subShapes[i]->GetName());
|
addInStudy(subShapes[i].in(), subShapes[i]->GetName());
|
||||||
|
subShapes[i]->UnRegister();
|
||||||
}
|
}
|
||||||
for (int i = 0; i < groups->length(); i++)
|
for (int i = 0; i < groups->length(); i++)
|
||||||
{
|
{
|
||||||
addInStudy(groups[i].in(), groups[i]->GetName());
|
addInStudy(groups[i].in(), groups[i]->GetName());
|
||||||
|
groups[i]->UnRegister();
|
||||||
}
|
}
|
||||||
for (int i = 0; i < fields->length(); i++)
|
for (int i = 0; i < fields->length(); i++)
|
||||||
{
|
{
|
||||||
@ -316,6 +319,7 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO
|
|||||||
|
|
||||||
SALOMEDS::SObject_var aSO =
|
SALOMEDS::SObject_var aSO =
|
||||||
getGeomEngine()->AddInStudy(aStudyDS, theField, theField->GetName(), theFather);
|
getGeomEngine()->AddInStudy(aStudyDS, theField, theField->GetName(), theFather);
|
||||||
|
theField->UnRegister();
|
||||||
|
|
||||||
QString anEntry;
|
QString anEntry;
|
||||||
if ( !aSO->_is_nil() ) {
|
if ( !aSO->_is_nil() ) {
|
||||||
@ -331,6 +335,7 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO
|
|||||||
QString stepName = (tr("XAOPLUGIN_STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() );
|
QString stepName = (tr("XAOPLUGIN_STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() );
|
||||||
SALOMEDS::SObject_wrap aSOField =
|
SALOMEDS::SObject_wrap aSOField =
|
||||||
getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), theField );
|
getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), theField );
|
||||||
|
step->UnRegister();
|
||||||
}
|
}
|
||||||
|
|
||||||
aSO->UnRegister();
|
aSO->UnRegister();
|
||||||
|
Loading…
Reference in New Issue
Block a user