From 516de26fe408fef6c96b6aa5390f5f8a18ea7160 Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 17 Dec 2007 14:18:20 +0000 Subject: [PATCH] *** empty log message *** --- src/VISUGUI/VisuGUI.cxx | 166 +++++++++++++++++++------------------- src/VISU_I/VISU_View_i.cc | 15 ++-- 2 files changed, 93 insertions(+), 88 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 29651cfb..dc30d4dd 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -186,14 +186,14 @@ VisuGUI if(MYDEBUG) MESSAGE("VisuGUI::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 = aResourceMgr->booleanValue("VISU", "use_build_progress", false); SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg( GetDesktop(this), true, tr("USE_BUILD_PROGRESS") ); @@ -204,11 +204,11 @@ VisuGUI QFileInfo aFileInfo( fd->selectedFile() ); toUseBuildProgress = fd->IsChecked(); delete fd; - + // Check the file name if ( !aFileInfo.exists() ) return; - + if ( !toUseBuildProgress ) { bool toBuildFields = aResourceMgr->booleanValue( "VISU", "build_fields", true ); @@ -216,8 +216,8 @@ VisuGUI 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.absoluteFilePath() + "..." ); + + QString anInfo("Importing From File " + aFileInfo.absoluteFilePath() + "..." ); application()->putInfo( anInfo ); QApplication::setOverrideCursor(Qt::WaitCursor); @@ -378,7 +378,7 @@ VisuGUI SUIT_MessageBox::warning( GetDesktop(this), tr("WRN_VISU"), tr("ERR_ERROR_DURING_EXPORT") ); - + } } } @@ -507,7 +507,7 @@ CreateCurves( SalomeApp_Module* theModule, } } } - + } aBuilder->RemoveObjectWithChildren( aTblObj ); // We should have only one child @@ -554,7 +554,7 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + // Get selected SObject VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO; @@ -687,14 +687,14 @@ VisuGUI Handle(SALOME_InteractiveObject) anIO = it.Value(); TObjectInfo anObjectInfo = VISU::GetObjectByEntry(GetAppStudy(this), anIO->getEntry()); VISU::Base_i* aBase = anObjectInfo.myBase; - if(!aBase) + if(!aBase) continue; VISU::VISUType aType = aBase->GetType(); switch (aType) { - case VISU::TCURVE: - case VISU::TCONTAINER: - case VISU::TTABLE: + case VISU::TCURVE: + case VISU::TCONTAINER: + case VISU::TTABLE: displayer()->Display(anIO->getEntry()); break; default: { @@ -954,20 +954,20 @@ namespace VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(theModule); if(aSelectionInfo.empty()) return false; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); thePrs3d = GetPrs3dFromBase(aSelectionItem.myObjectInfo.myBase); if(!thePrs3d) return false; - + theViewWindow = GetActiveViewWindow(theModule); if(!theViewWindow) return false; - + thenActor = FindActor(theViewWindow, thePrs3d); if(!thenActor) return false; - + return true; } } @@ -982,7 +982,7 @@ VisuGUI SVTK_ViewWindow* aViewWindow = NULL; if(!GetPrs3dSelectionInfo(this, aPrs3d, aViewWindow, anActor)) return; - + VISU::Mesh_i* aMesh = dynamic_cast(aPrs3d); VISU::DeformedShape_i* aDeformedShape = dynamic_cast(aPrs3d); @@ -1047,7 +1047,7 @@ VisuGUI SVTK_ViewWindow* aViewWindow = NULL; if(!GetPrs3dSelectionInfo(this, aPrs3d, aViewWindow, anActor)) return; - + VISU::Mesh_i* aMesh = dynamic_cast(aPrs3d); if(!aMesh) return; @@ -1076,7 +1076,7 @@ VisuGUI SVTK_ViewWindow* aViewWindow = NULL; if(!GetPrs3dSelectionInfo(this, aPrs3d, aViewWindow, anActor)) return; - + VisuGUI_TransparencyDlg* aDialog = new VisuGUI_TransparencyDlg( this ); aDialog->show(); } @@ -1091,7 +1091,7 @@ VisuGUI SVTK_ViewWindow* aViewWindow = NULL; if(!GetPrs3dSelectionInfo(this, aPrs3d, aViewWindow, anActor)) return; - + VisuGUI_CursorDlg* CursorDlg = new VisuGUI_CursorDlg (GetDesktop(this), (const char*)tr("DLG_LINEWIDTH_TITLE").toLatin1(), TRUE); @@ -1121,14 +1121,14 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO; VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase; _PTR(SObject) aSObject = aSelectionItem.myObjectInfo.mySObject; if(VISU::Table_i* aTable = dynamic_cast(aBase)) aSObject = GetCStudy( GetAppStudy( this ) )->FindObjectID( aTable->GetObjectEntry() ); - + if( !IsSObjectTable( aSObject ) ) return; @@ -1149,7 +1149,7 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); _PTR(SObject) aSObject = aSelectionItem.myObjectInfo.mySObject; VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase; @@ -1237,7 +1237,7 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); if(VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase){ if(aBase->GetType() == VISU::TTABLE) { @@ -1264,7 +1264,7 @@ VisuGUI int marker, line, lineWidth; QColor color; if ( aDlg->getCurveAttributes(verIndices[i], isAuto, marker, - line, lineWidth, color) && !isAuto ) + line, lineWidth, color) && !isAuto ) { SALOMEDS::Color c; c.R = color.red() /255.; @@ -1329,7 +1329,7 @@ VisuGUI int marker, line, lineWidth; QColor color; if ( aDlg->getCurveAttributes(verIndices[i], isAuto, marker, - line, lineWidth, color) && !isAuto ) + line, lineWidth, color) && !isAuto ) { SALOMEDS::Color c; c.R = color.red()/255.; @@ -1380,7 +1380,7 @@ VisuGUI VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO; VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase; - if(!aBase) + if(!aBase) return; if(aBase->GetType() == VISU::TCURVE) { @@ -1420,7 +1420,7 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase; if(!aBase) @@ -1445,14 +1445,14 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase; if(!aBase) return; VISU::Container_i* aContainer = dynamic_cast(aBase); - if(!aContainer) + if(!aContainer) return; VisuGUI_EditContainerDlg* aDlg = new VisuGUI_EditContainerDlg (this); @@ -1527,7 +1527,7 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); _PTR(SObject) aSObject = aSelectionItem.myObjectInfo.mySObject; if(!aSObject) @@ -1570,7 +1570,7 @@ VisuGUI Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO; aName->SetValue((const char*)Name.toLatin1()); // rename the SObject anIO->setName((const char*)Name.toLatin1()); // rename the InteractiveObject - + ViewManagerList aViewManagerList; ViewManagerList::Iterator anIt; getApp()->viewManagers(SPlot2d_Viewer::Type(), aViewManagerList); @@ -1760,7 +1760,7 @@ VisuGUI VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase; if(!aBase) @@ -2171,11 +2171,11 @@ VisuGUI createAction( VISU_UNSHRINK, tr("MEN_UNSHRINK"), QIcon(), tr("MEN_UNSHRINK"), "", 0, aParent, false, this, SLOT(OnMakeShrink())); - + createAction( VISU_SHADING, tr("MEN_SHADING"), QIcon(), tr("MEN_SHADING"), "", 0, aParent, false, this, SLOT(OnSetShadingOn())); - + createAction( VISU_NOSHADING, tr("MEN_NOSHADING"), QIcon(), tr("MEN_NOSHADING"), "", 0, aParent, false, this, SLOT(OnSetShadingOff())); @@ -2325,7 +2325,7 @@ VisuGUI int aMenuId; aMenuId = createMenu( tr( "MEN_DESK_FILE" ), -1 ); createMenu( separator(), aMenuId, -1, 10 ); - + int anImportId = createMenu( tr( "MEN_IMPORT" ), aMenuId, -1, 10 ); createMenu( VISU_IMPORT_FROM_FILE, anImportId ); // import from file createMenu( VISU_IMPORT_TABLE, anImportId ); // import table @@ -2499,8 +2499,8 @@ VisuGUI mgr->insert( action( VISU_MULTIPR_LOW_RES ), -1, -1, -1 ); mgr->insert( action( VISU_MULTIPR_HIDE ), -1, -1, -1 ); #endif - - + + // Rules QString aPrsAll ("'VISU::TSCALARMAP' 'VISU::TISOSURFACE' 'VISU::TDEFORMEDSHAPE' 'VISU::TCUTPLANES' " @@ -2674,7 +2674,7 @@ VisuGUI //aRule = "client='ObjectBrowser' and type='MEDFIELD'"; //mgr->setRule( action( VISU_IMPORT_MED ), aRule, true ); - + #ifdef ENABLE_MULTIPR // MULTIPR aRule = "client='ObjectBrowser' and $type in {'VISU::TPART'}"; @@ -2787,7 +2787,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QStrin VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO; _PTR(SObject) aSObject = aSelectionItem.myObjectInfo.mySObject; @@ -2813,7 +2813,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QStrin } // Check single selection - if (aListIO.Extent() != 1) + if (aListIO.Extent() != 1) return; bool isExist; @@ -2951,16 +2951,16 @@ void VisuGUI::createPreferences() { // TAB: "MED import" int importTab = addPreference( tr( "MED import" ) ); - //printf( "Tab index %d\n", importTab ); + //printf( "++++++++++++++++++ Tab index %d\n", importTab ); //int importFrame = addPreference( tr( "MED FRAME" ), importTab ); //printf( "Frame index %d\n", importFrame ); - - + // group: "MED files import" int importGr = addPreference( tr( "MED files import" ), importTab ); //printf( "Group index %d\n", importGr ); - setPreferenceProperty( importGr, "columns", 1 ); + setPreferenceProperty( importGr, "columns", 2 ); + addPreference( tr( "Use build progress" ), importGr, LightApp_Preferences::Bool, "VISU", "use_build_progress" ); addPreference( tr( "Full MED loading" ), importGr, LightApp_Preferences::Bool, "VISU", "full_med_loading" ); addPreference( tr( "Build at once" ), importGr, LightApp_Preferences::Bool, "VISU", "build_at_once" ); @@ -2973,7 +2973,7 @@ void VisuGUI::createPreferences() int sbarTab = addPreference( tr( "VISU_SCALAR_BAR" ) ); int rangeGr = addPreference( tr( "VISU_SCALAR_RANGE" ), sbarTab ); - setPreferenceProperty( rangeGr, "columns", 1 ); + setPreferenceProperty( rangeGr, "columns", 4 ); int mode = addPreference( tr( "VISU_SCALAR_MODE" ), rangeGr, LightApp_Preferences::Selector, "VISU", "scalar_bar_mode" ); QStringList modes; @@ -2989,8 +2989,6 @@ void VisuGUI::createPreferences() setPreferenceProperty( mode, "strings", modes ); setPreferenceProperty( mode, "indexes", indices ); - addPreference( tr( "VISU_LOGARITHMIC_SCALING" ), rangeGr, LightApp_Preferences::Bool, "VISU", "scalar_bar_logarithmic" ); - int rangetype = addPreference( tr( "VISU_RANGE_TO_USE" ), rangeGr, LightApp_Preferences::Selector, "VISU", "scalar_range_type" ); QStringList types; types.append( tr( "VISU_FIELD_RANGE" ) ); @@ -3001,7 +2999,10 @@ void VisuGUI::createPreferences() setPreferenceProperty( rangetype, "strings", types ); setPreferenceProperty( rangetype, "indexes", indices ); + addPreference( tr( "VISU_LOGARITHMIC_SCALING" ), rangeGr, LightApp_Preferences::Bool, "VISU", "scalar_bar_logarithmic" ); + int imposedGr = addPreference( tr( "VISU_MINMAX_IMPOSED_RANGE" ), sbarTab ); + setPreferenceProperty( imposedGr, "columns", 2 ); int min = addPreference( tr( "VISU_MIN" ), imposedGr, LightApp_Preferences::DblSpin, "VISU", "scalar_range_min" ); int max = addPreference( tr( "VISU_MAX" ), imposedGr, LightApp_Preferences::DblSpin, "VISU", "scalar_range_max" ); @@ -3034,6 +3035,7 @@ void VisuGUI::createPreferences() // group: "Colors & Labels" int colorsLabelsGr = addPreference( tr( "VISU_COLORS_AND_LABELS" ), sbarTab ); + setPreferenceProperty( colorsLabelsGr, "columns", 2 ); int numcol = addPreference( tr( "VISU_NB_COLORS" ), colorsLabelsGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_num_colors" ); @@ -3060,6 +3062,7 @@ void VisuGUI::createPreferences() // group: "Origin & Size Vertical" int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), sbarTab ); + setPreferenceProperty( posVSizeGr, "columns", 2 ); int xv = addPreference( tr( "VISU_X" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" ); int yv = addPreference( tr( "VISU_Y" ), posVSizeGr, @@ -3083,6 +3086,7 @@ void VisuGUI::createPreferences() // group: "Origin & Size Horizontal" int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), sbarTab ); + setPreferenceProperty( posHSizeGr, "columns", 2 ); int xh = addPreference( tr( "VISU_X" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_x" ); int yh = addPreference( tr( "VISU_Y" ), posHSizeGr, @@ -3122,11 +3126,11 @@ void VisuGUI::createPreferences() // TAB: "Sweep, Animation" int srangeTab = addPreference( tr( "Sweep, Animation" ) ); - + // group: "Sweeping preferences" int sweepGr = addPreference( tr( "VISU_SWEEPING_PREF" ), srangeTab ); setPreferenceProperty( sweepGr, "columns", 1 ); - + int modeSw = addPreference( tr( "VISU_SWEEPING_MODES" ), sweepGr, LightApp_Preferences::Selector, "VISU", "sweeping_modes" ); QStringList sweep_modes; sweep_modes.append( tr( "VISU_LINEAR_SWEEP" ) ); @@ -3159,7 +3163,7 @@ void VisuGUI::createPreferences() setPreferenceProperty( timestep, "step", 0.1 ); setPreferenceProperty( timestep, "max", 1000 ); setPreferenceProperty( nbcycles, "max", 100 ); - setPreferenceProperty( nbsteps, "max", 200 ); + setPreferenceProperty( nbsteps, "max", 200 ); // group: "Animation preferences" int animationGr = addPreference( tr( "Animation preferences" ), srangeTab ); @@ -3169,15 +3173,15 @@ void VisuGUI::createPreferences() addPreference( tr( "Cycled animation" ), animationGr, LightApp_Preferences::Bool, "VISU", "cycled_animation" ); addPreference( tr( "Use proportional timing" ), animationGr, LightApp_Preferences::Bool, "VISU", "use_proportional_timing" ); addPreference( tr( "Clean memory at each frame" ), animationGr, LightApp_Preferences::Bool, "VISU", "clean_memory_at_each_frame" ); - + setPreferenceProperty( speed, "min", 1 ); setPreferenceProperty( speed, "max", 99 ); // TAB: Representation ; group: "Representation properties" int representationTab = addPreference( tr( "Representation" ) ); - + int representGr = addPreference( tr( "VISU_REPRESENT_PROPS" ), representationTab ); - + QStringList mesh_modes; mesh_modes.append( "Points" ); mesh_modes.append( "Wireframe" ); @@ -3190,12 +3194,12 @@ void VisuGUI::createPreferences() mesh_indices.append( 3 ); mesh_indices.append( 4 ); mesh_indices.append( 2 ); - + QStringList modes1 = mesh_modes; modes1.removeAll( "Insideframe" ); QList indices1 = mesh_indices; indices1.removeAll( 3 ); - + QStringList modes2 = modes1; modes2.removeAll( "Surfaceframe" ); QList indices2 = indices1; @@ -3205,8 +3209,8 @@ void VisuGUI::createPreferences() modes3.removeAll( "Surface" ); QList indices3 = indices2; indices3.removeAll( 2 ); - - + + int mesh_represent = addPreference( tr( "VISU_MESH" ), representGr, LightApp_Preferences::Selector, "VISU", "mesh_represent" ); setPreferenceProperty( mesh_represent, "strings", mesh_modes ); setPreferenceProperty( mesh_represent, "indexes", mesh_indices ); @@ -3256,7 +3260,7 @@ void VisuGUI::createPreferences() setPreferenceProperty( scalar_def_represent, "strings", modes1 ); setPreferenceProperty( scalar_def_represent, "indexes", indices1 ); addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "scalar_def_shrink" ); - + addPreference( tr( "VISU_USE_SHADING" ), representGr, LightApp_Preferences::Bool, "VISU", "represent_shading" ); addPreference( "", representGr, LightApp_Preferences::Space ); @@ -3266,7 +3270,7 @@ void VisuGUI::createPreferences() // TAB: 3D Cache ; group: "Cache properties" int cacheTab = addPreference( tr( "3D Cache" ) ); - + int cacheGr = addPreference( tr( "VISU_3DCACHE_PROPS" ), cacheTab ); setPreferenceProperty( cacheGr, "columns", 1 ); @@ -3278,7 +3282,7 @@ void VisuGUI::createPreferences() indices.append( 1 ); setPreferenceProperty( mode, "strings", modes ); setPreferenceProperty( mode, "indexes", indices ); - + int memory_mode = addPreference( tr( "VISU_MEMORY_MODE" ), cacheGr, LightApp_Preferences::Selector, "VISU", "cache_memory_mode" ); setPreferenceProperty( memory_mode, "strings", modes ); @@ -3370,7 +3374,7 @@ LightApp_Displayer* VisuGUI::displayer() { if( !myDisplayer ) myDisplayer = new VisuGUI_Displayer( getApp() ); - + return myDisplayer; } @@ -3403,7 +3407,7 @@ void VisuGUI::OnPlot3dFromCutPlane() if(VISU::Prs3d_i* aPrsObject = VISU::GetPrs3dFromBase(anObjectInfo.myBase)){ if (aPrsObject->GetType() == VISU::TCUTPLANES) { aCutPrs = dynamic_cast(aPrsObject); - if (aCutPrs) + if (aCutPrs) break; } } @@ -3421,7 +3425,7 @@ void VisuGUI::OnPlot3dFromCutPlane() aType = Storable::FindValue(aMap,"myType",&isExist); if (!isExist || aType.toInt() != TTIMESTAMP ) return; - + QString aMeshName = (const char*)Storable::FindValue(aMap,"myMeshName",&isExist).toLatin1(); QString anEntity = (const char*)Storable::FindValue(aMap,"myEntityId",&isExist).toLatin1(); QString aFieldName = (const char*)Storable::FindValue(aMap,"myFieldName",&isExist).toLatin1(); @@ -3437,13 +3441,13 @@ void VisuGUI::OnPlot3dFromCutPlane() aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast(GetViewWindow(this))); } GetResourceMgr()->setValue("VISU", "scalar_bar_position_num", aPos); - - VISU::Plot3D_i* aPrs3d = - CreatePrs3dFromFactory(this, - aTimeStampSObj, - (const char*)aMeshName.toLatin1(), + + VISU::Plot3D_i* aPrs3d = + CreatePrs3dFromFactory(this, + aTimeStampSObj, + (const char*)aMeshName.toLatin1(), (Entity)anEntity.toInt(), - (const char*)aFieldName.toLatin1(), + (const char*)aFieldName.toLatin1(), aTimeStampId.toInt(), ColoredPrs3d_i::EPublishUnderTimeStamp); if (aPrs3d) { @@ -3457,7 +3461,7 @@ void VisuGUI::OnPlot3dFromCutPlane() double aRotY = aCutPrs->GetRotateY(); double aPlanePos = aCutPrs->GetPlanePosition(0); aDlg->setPlane(aOrient, aRotX, aRotY, aPlanePos); - + if (!(runAndWait(aDlg, 0) && (aDlg->storeToPrsObject(aPrs3d)))) { DeletePrs3d(this, aPrs3d); delete aDlg; @@ -3470,7 +3474,7 @@ void VisuGUI::OnPlot3dFromCutPlane() if ( aSVtkWindow ) { PublishInView(this, aPrs3d, aSVtkWindow, /*highlight = */true); aSVtkWindow->onFitAll(); - + AddScalarBarPosition(this, aSVtkWindow, aPrs3d, aPos); } } @@ -3484,7 +3488,7 @@ void VisuGUI::OnCacheProperties() VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this); if(aSelectionInfo.empty()) return; - + VISU::TSelectionItem aSelectionItem = aSelectionInfo.front(); _PTR(SObject) aSObject = aSelectionItem.myObjectInfo.mySObject; @@ -3564,22 +3568,22 @@ void VisuGUI::OnMultiprChangeRes(char resolution) { bool hasMediumOrLow = (strstr(aSObject->GetComment().c_str(), "res=FML") != NULL); - if (resolution == 'F') + if (resolution == 'F') { if (result != NULL) result->SetResolutionMultipr(aSObject->GetName().c_str(), 'F'); aPixMap->SetPixMap("ICON_MULTIPR_VIEW_FULL"); - } - else if ((resolution == 'M') && hasMediumOrLow) + } + else if ((resolution == 'M') && hasMediumOrLow) { if (result != NULL) result->SetResolutionMultipr(aSObject->GetName().c_str(), 'M'); aPixMap->SetPixMap("ICON_MULTIPR_VIEW_MEDIUM"); - } - else if ((resolution == 'L') && hasMediumOrLow) + } + else if ((resolution == 'L') && hasMediumOrLow) { if (result != NULL) result->SetResolutionMultipr(aSObject->GetName().c_str(), 'L'); - aPixMap->SetPixMap("ICON_MULTIPR_VIEW_LOW"); + aPixMap->SetPixMap("ICON_MULTIPR_VIEW_LOW"); } - else if (resolution == 'H') + else if (resolution == 'H') { if (result != NULL) result->SetResolutionMultipr(aSObject->GetName().c_str(), 'H'); aPixMap->SetPixMap("ICON_MULTIPR_VIEW_HIDE"); diff --git a/src/VISU_I/VISU_View_i.cc b/src/VISU_I/VISU_View_i.cc index 7ef0ef2e..16ef57cf 100644 --- a/src/VISU_I/VISU_View_i.cc +++ b/src/VISU_I/VISU_View_i.cc @@ -148,15 +148,16 @@ namespace VISU { { switch(myViewRepresentation){ case VISU::View::OBJECTBROWSER: - myApplication->setWindowShown(SalomeApp_Application::WT_ObjectBrowser,myState); + myApplication->dockWindow( SalomeApp_Application::WT_ObjectBrowser )->setVisible( myState ); break; case VISU::View::PYTHON: - myApplication->setWindowShown(SalomeApp_Application::WT_PyConsole,myState); + myApplication->dockWindow( SalomeApp_Application::WT_PyConsole )->setVisible( myState ); break; case VISU::View::MESSAGES: - myApplication->setWindowShown(SalomeApp_Application::WT_LogWindow,myState); + myApplication->dockWindow( SalomeApp_Application::WT_LogWindow )->setVisible( myState ); break; - case VISU::View::VIEWER:{ + case VISU::View::VIEWER: + { ViewManagerList mgrs = myApplication->viewManagers(); ViewManagerList::const_iterator anIt = mgrs.begin(), aLast = mgrs.end(); for( ; anIt!=aLast; anIt++ ) @@ -192,13 +193,13 @@ namespace VISU { { switch(myViewRepresentation){ case VISU::View::OBJECTBROWSER: - myResult = myApplication->isWindowVisible(SalomeApp_Application::WT_ObjectBrowser); + myResult = myApplication->dockWindow( SalomeApp_Application::WT_ObjectBrowser )->isVisible(); break; case VISU::View::PYTHON: - myResult = myApplication->isWindowVisible(SalomeApp_Application::WT_PyConsole); + myResult = myApplication->dockWindow( SalomeApp_Application::WT_PyConsole )->isVisible(); break; case VISU::View::MESSAGES: - myResult = myApplication->isWindowVisible(SalomeApp_Application::WT_LogWindow); + myResult = myApplication->dockWindow( SalomeApp_Application::WT_LogWindow )->isVisible(); break; case VISU::View::VIEWER:{ ViewManagerList aViewManagerList = myApplication->viewManagers(); -- 2.39.2