From b22ae222792e09520e56684bdc42dbbac6510100 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 23 Sep 2005 05:53:56 +0000 Subject: [PATCH] To remove some massages --- src/VISUGUI/VisuGUI_GaussPointsDlg.cxx | 33 +++++++++++--------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx index f4ff3629..1cd66bde 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsDlg.cxx @@ -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() -- 2.39.2