Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug #232: fit all on image show
[modules/hydro.git]
/
src
/
HYDROGUI
/
HYDROGUI_ShowHideOp.cxx
diff --git
a/src/HYDROGUI/HYDROGUI_ShowHideOp.cxx
b/src/HYDROGUI/HYDROGUI_ShowHideOp.cxx
index 90a1c4d1cd98cdcf2e25b1c6d07e104a151b0a9a..6ff798943be9ba6eb0bf539e0169ac2ac717d6f2 100644
(file)
--- 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 )
{
// 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() )
{
anObject = aSeq.Value( anIndex );
if( !anObject.IsNull() )
{
+ if ( anObject->GetKind() == KIND_IMAGE )
+ isFoundImage = true;
+
module()->setObjectVisible( aViewId, anObject, aVisibility );
if ( anObject->GetKind() == KIND_REGION )
{
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 )
{
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
}
// Set VTK viewer active if show a bathymetry