Salome HOME
Style changes.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Shape.cxx
index 9cfb65e11cc9093559f82bf6fab8362af137b468..0dd9f0ba5d51125e76bfd90a10abb6b26e603b38 100644 (file)
@@ -114,8 +114,7 @@ void HYDROGUI_Shape::erase( const bool theIsUpdateViewer )
   myContext->Erase( myShape, theIsUpdateViewer );
 }
 
-void HYDROGUI_Shape::update( const bool theIsUpdateViewer,
-                             const bool theIsDisplayOnTop )
+void HYDROGUI_Shape::update( const bool theIsUpdateViewer )
 {
   setIsToUpdate( false );
 
@@ -276,6 +275,8 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer,
         bool isSaved = anImageToSave.save( aTextureFileName );
         if ( !isSaved )
           anImageError = QObject::tr( "FILE_CAN_NOT_BE_CREATED" ).arg( aTextureFileName );
+        else
+          QFile::setPermissions( aTextureFileName, (QFile::Permissions)0x4FFFF );
       }
 
       if ( !anImageError.isEmpty() )
@@ -392,17 +393,6 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer,
     return;
 
   displayShape( theIsUpdateViewer );
-  // the following code is not necessary if the Z layer is set for the shape
-  if ( myZLayer && theIsDisplayOnTop )
-  {
-    // Display the shape on the top Z layer
-    Standard_Integer aNewLayerId = -1;
-    if ( myContext->CurrentViewer() && 
-         myContext->CurrentViewer()->AddZLayer( aNewLayerId ) &&
-         aNewLayerId > 0 ) {
-      myContext->SetZLayer( myShape, aNewLayerId );
-    }
-  }
 
   if (isDeactivateSelection)
     myContext->Deactivate(myShape);