From 4f96058d65575ec2260e0c302ca611fa25f9d92a Mon Sep 17 00:00:00 2001 From: mzn Date: Tue, 14 Feb 2006 16:12:58 +0000 Subject: [PATCH] Correction. --- src/VISUGUI/VisuGUI.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 508cc0b5..7bc17315 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -173,12 +173,14 @@ OnImportFromFile() if ( CheckLock(GetCStudy(GetAppStudy(this)),GetDesktop(this)) ) return; + SUIT_ResourceMgr* aResourceMgr = GetResourceMgr(); + // Get file name QStringList aFilter; aFilter.append( tr( "FLT_MED_FILES" ) ); aFilter.append( tr( "FLT_ALL_FILES" ) ); - bool toUseBuildProgress = GetResourceMgr()->booleanValue("VISU", "use_build_progress", false); + bool toUseBuildProgress = aResourceMgr->booleanValue("VISU", "use_build_progress", false); SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg( GetDesktop(this), true, tr("USE_BUILD_PROGRESS") ); fd->setCaption( tr( "IMPORT_FROM_FILE" ) ); @@ -195,9 +197,22 @@ OnImportFromFile() if ( !toUseBuildProgress ) { + bool toBuildFields = aResourceMgr->booleanValue( "VISU", "build_fields", true ); + bool toBuildMinMax = aResourceMgr->booleanValue( "VISU", "build_min_max", true ); + bool toBuildGroups = aResourceMgr->booleanValue( "VISU", "build_groups", true ); + bool toBuildAll = aResourceMgr->booleanValue( "VISU", "full_med_loading", false ); + bool toBuildAtOnce = aResourceMgr->booleanValue( "VISU", "build_at_once", false ); + QString anInfo("Importing From File " + aFileInfo.filePath() + "..." ); application()->putInfo( anInfo ); - VISU::Result_var aResult = GetVisuGen(this)->ImportFile(aFileInfo.filePath()); + + QApplication::setOverrideCursor(Qt::waitCursor); + VISU::Result_var aResult = GetVisuGen(this)->CreateResult( aFileInfo.filePath() ); + aResult->SetBuildFields( toBuildFields, toBuildMinMax ); + aResult->SetBuildGroups( toBuildGroups ); + aResult->Build( toBuildAll, toBuildAtOnce ); + QApplication::restoreOverrideCursor(); + if (CORBA::is_nil(aResult.in())) { SUIT_MessageBox::warn1(GetDesktop(this), tr("WRN_VISU"), -- 2.39.2