]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Correction.
authormzn <mzn@opencascade.com>
Tue, 14 Feb 2006 16:12:58 +0000 (16:12 +0000)
committermzn <mzn@opencascade.com>
Tue, 14 Feb 2006 16:12:58 +0000 (16:12 +0000)
src/VISUGUI/VisuGUI.cxx

index 508cc0b5289e95afd3a330725d130e5892709fcf..7bc173150efc329afe5f15eda120d3142ca8e4ce 100644 (file)
@@ -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"),