]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To remove some massages
authorapo <apo@opencascade.com>
Fri, 23 Sep 2005 05:53:56 +0000 (05:53 +0000)
committerapo <apo@opencascade.com>
Fri, 23 Sep 2005 05:53:56 +0000 (05:53 +0000)
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx

index f4ff3629032bb42eef6aadfc87ff9b6f7456f59d..1cd66bde2b5a2bdebd3ec8021d1f3d730243cade 100644 (file)
@@ -992,7 +992,6 @@ int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::GaussPoints_i* thePrs )
   // Texture
   if( myMainTexture.isNull() || myAlphaChannelTexture.isNull() )
   {
-    //return 1;
     myMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp";
     myAlphaChannelTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp";
   }
@@ -1002,25 +1001,21 @@ int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::GaussPoints_i* thePrs )
   QString mainTextureVTI = mainTextureImage.section( '.', 0, -2 ) + ".vti";
 
   QString command1 = QString( "VISU_img2vti " ) + mainTextureFormat + " " + mainTextureImage + " " + mainTextureVTI;
-  cout << command1.latin1() << endl;
-  system( command1.latin1() );
-
-  QString alphaTextureImage = myAlphaChannelTexture;
-  QString alphaTextureFormat = alphaTextureImage.section( '.', -1 );
-  QString alphaTextureVTI = alphaTextureImage.section( '.', 0, -2 ) + ".vti";
-
-  QString command2 = QString( "VISU_img2vti " ) + alphaTextureFormat + " " + alphaTextureImage + " " + alphaTextureVTI;
-  cout << command2.latin1() << endl;
-  system( command2.latin1() );
-
-  cout << mainTextureVTI.latin1() << endl;
-  cout << alphaTextureVTI.latin1() << endl;
-
-  thePrs->SetMainTexture( mainTextureImage );
-  thePrs->SetAlphaChannelTexture( alphaTextureImage );
-  thePrs->MakeTexture( mainTextureVTI, alphaTextureVTI );
+  if(system(command1.latin1()) == 0){
+    QString alphaTextureImage = myAlphaChannelTexture;
+    QString alphaTextureFormat = alphaTextureImage.section( '.', -1 );
+    QString alphaTextureVTI = alphaTextureImage.section( '.', 0, -2 ) + ".vti";
+
+    QString command2 = QString( "VISU_img2vti " ) + alphaTextureFormat + " " + alphaTextureImage + " " + alphaTextureVTI;
+    if(system(command2.latin1()) == 0){
+      thePrs->SetMainTexture( mainTextureImage );
+      thePrs->SetAlphaChannelTexture( alphaTextureImage );
+      thePrs->MakeTexture( mainTextureVTI, alphaTextureVTI );
+      return true;
+    }
+  }
 
-  return 1;
+  return false;
 }
 
 void VisuGUI_GaussPointsDlg::accept()