]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
BugID IPAL8996, fixed method getTrihedronSize
authorsrn <srn@opencascade.com>
Thu, 16 Jun 2005 07:33:54 +0000 (07:33 +0000)
committersrn <srn@opencascade.com>
Thu, 16 Jun 2005 07:33:54 +0000 (07:33 +0000)
src/SOCC/SOCC_ViewModel.cxx

index 86d97ff67ff83f8776795b4eed6564907992040b..c21735bbac0185ae7db6af6cad29077d9ea8e696 100755 (executable)
@@ -550,7 +550,13 @@ bool SOCC_Viewer::getTrihedronSize( double& theNewSize, double& theSize )
   theNewSize = 100;
   theSize = 100;
 
-  Handle(V3d_View) view3d = getViewer3d()->ActiveView();
+  //SRN: BUG IPAL8996, a usage of method ActiveView without an initialization
+  Handle(V3d_Viewer) viewer = getViewer3d();
+  viewer->InitActiveViews();
+  if(!viewer->MoreActiveViews()) return false;
+
+  Handle(V3d_View) view3d = viewer->ActiveView();
+  //SRN: END of fix
 
   if ( view3d.IsNull() )
     return false;