Salome HOME
land cover object is removed from the data model
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_OCCDisplayer.cxx
index 6cfbf67e20ebbfedb2ef2d6d431a2159eb88628b..ccec796fca83cda5220761d0d301e838cded7442 100644 (file)
@@ -415,7 +415,7 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
   
   OCCViewer_ViewWindow* aWnd = dynamic_cast<OCCViewer_ViewWindow*>( theViewer->getViewManager()->getActiveView() );
   Handle(V3d_View) aView = aWnd->getViewPort()->getView();
-    
+      
   int aViewerId = (size_t)theViewer;//TODO: check if viewer id is correct
   bool isLandCoverColoringOn = module()->isLandCoversScalarMapModeOn( aViewerId );
     
@@ -435,11 +435,12 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
 
   // Get range
   Handle(HYDROData_StricklerTable) aTable;
-  TColStd_SequenceOfExtendedString aTableTypes;
+  QStringList aTableTypes;
   if ( isLandCoverColoringOn ) {
     aTable = module()->getLandCoverColoringTable( aViewerId );
     if ( !aTable.IsNull() ) {
-      aColorScaleTitle = TCollection_ExtendedString( aTable->GetName().toLatin1().constData() );
+      // TODO: non-empty title leads to buggy behaviour
+      // aColorScaleTitle = TCollection_ExtendedString( aTable->GetName().toLatin1().constData() );
       aTable->GetCoefficientRange( aColorScaleMin, aColorScaleMax );
       aTableTypes = aTable->GetTypes();
     }
@@ -518,7 +519,7 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
     QColor aColor = isLandCoverColoringOn ? aUndefinedColor : aLandCover->GetFillingColor();
     
     if ( isLandCoverColoringOn && !aTable.IsNull() ) {
-      TCollection_ExtendedString aStricklerType = 
+      QString aStricklerType = 
         aLandCover->GetStricklerType().toLatin1().constData();
      
       if ( aTable->HasType( aStricklerType ) ) {
@@ -535,9 +536,6 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
     aLandCoverShape->setFillingColor( aColor, true, true );
     aLandCoverShape->setScalarMapModeEnabled( isLandCoverColoringOn );
     theViewer->getAISContext()->Redisplay( aLandCoverShape->getAISObject() );
-    //theViewer->getAISContext()->UpdateCurrentViewer(); //@MZN
-    //theViewer->getAISContext()->UpdateCurrent();
-    //theViewer->getAISContext()->UpdateSelected( true );
   }
 
   myToUpdateColorScale = false;