Salome HOME
Typo-fix by Kunda
[modules/geom.git] / src / GEOMGUI / GEOM_Displayer.cxx
index 363f312b2688acfc651b41a41a064f0319b5896b..6925d8d22f242750d14137c811a78aef4846b8ee 100755 (executable)
@@ -943,7 +943,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
         study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
         study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
         
-        // Update propeties map
+        // Update properties map
         propMap = getObjectProperties( study, entry, myViewFrame );
       }
     }
@@ -1672,7 +1672,7 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
 //=================================================================
 /*!
  *  GEOM_Displayer::BuildPrs
- *  Build presentation accordint to the current viewer type
+ *  Build presentation according to the current viewer type
  */
 //=================================================================
 SALOME_Prs* GEOM_Displayer::BuildPrs( GEOM::GEOM_Object_ptr theObj )
@@ -1701,7 +1701,7 @@ SALOME_Prs* GEOM_Displayer::BuildPrs( GEOM::GEOM_Object_ptr theObj )
 //=================================================================
 /*!
  *  GEOM_Displayer::BuildPrs
- *  Build presentation accordint to the current viewer type
+ *  Build presentation according to the current viewer type
  */
 //=================================================================
 SALOME_Prs* GEOM_Displayer::BuildPrs( const TopoDS_Shape& theShape )
@@ -1790,7 +1790,8 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
 
                   if ( !GeomObject->_is_nil() )
                   {
-                    theIO->setName( GeomObject->GetName() );
+                    CORBA::String_var name = GeomObject->GetName();
+                    theIO->setName( name );
                     // finally set shape
                     setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
                   }
@@ -2977,6 +2978,7 @@ void GEOM_Displayer::UpdateColorScale()
   foreach( SUIT_ViewWindow* window, windows )
   {
     OCCViewer_ViewWindow* occWindow = dynamic_cast<OCCViewer_ViewWindow*>( window );
+    if ( !occWindow ) continue;
     if ( !occWindow->getViewManager() ) continue;
     if ( !window->getViewManager() ) continue;
     if ( !window->getViewManager()->getViewModel() ) continue;
@@ -3025,7 +3027,6 @@ void GEOM_Displayer::UpdateColorScale()
             colorScale->SetBreadth( viewWidth * width );
             colorScale->SetHeight( viewHeight * height );
             colorScale->SetRange( fieldStepRangeMin, fieldStepRangeMax );
-            printf("fieldStepRangeMin, fieldStepRangeMax: %f, %f\n", fieldStepRangeMin, fieldStepRangeMax);
             colorScale->SetNumberOfIntervals( fieldDataType == GEOM::FDT_Bool ? 2 : nbIntervals );
             colorScale->SetTextHeight( textHeight );
             colorScale->SetTitle( fieldStepName );