From: asl Date: Fri, 13 Dec 2013 06:15:04 +0000 (+0000) Subject: bug #232: fit all on image show X-Git-Tag: BR_hydro_v_0_5~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ee052316eb0a4857a0241a22275528191ce3687;p=modules%2Fhydro.git bug #232: fit all on image show --- diff --git a/src/HYDROGUI/HYDROGUI_ShowHideOp.cxx b/src/HYDROGUI/HYDROGUI_ShowHideOp.cxx index 90a1c4d1..6ff79894 100644 --- a/src/HYDROGUI/HYDROGUI_ShowHideOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ShowHideOp.cxx @@ -99,6 +99,7 @@ void HYDROGUI_ShowHideOp::startOperation() } } + bool isFoundImage = false; // for selected objects if( myId == ShowId || myId == ShowOnlyId || myId == HideId ) { @@ -111,6 +112,9 @@ void HYDROGUI_ShowHideOp::startOperation() anObject = aSeq.Value( anIndex ); if( !anObject.IsNull() ) { + if ( anObject->GetKind() == KIND_IMAGE ) + isFoundImage = true; + module()->setObjectVisible( aViewId, anObject, aVisibility ); if ( anObject->GetKind() == KIND_REGION ) { @@ -150,7 +154,8 @@ void HYDROGUI_ShowHideOp::startOperation() if ( myId == ShowOnlyId || myId == ShowId || myId == ShowAllId ) { - //anUpdateFlags |= UF_FitAll; + if( isFoundImage || myId == ShowAllId ) + anUpdateFlags |= UF_FitAll; } // Set VTK viewer active if show a bathymetry