Salome HOME
Fix of 0022437: EDF GEOM: Texture is lost when hiding and showing again a shape....
[modules/geom.git] / src / EntityGUI / EntityGUI_PictureImportDlg.cxx
index 3feaf26adbcd73fc023822feb571df9ae610c1e7..3e521dfdbdffde7f3f9536ee942e4a4acd7d1ae5 100644 (file)
@@ -184,12 +184,15 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects )
   int height            =  pixmap->height();
   int width             =  pixmap->width();
   
+  delete pixmap;
+  
   GEOM::GEOM_Object_var P1 = aBasicOperations->MakePointXYZ( -0.5*width, -0.5*height, 0 );
   GEOM::GEOM_Object_var P2 = aBasicOperations->MakePointXYZ( -0.5*width,  0.5*height, 0 );
   GEOM::GEOM_Object_var P3 = aBasicOperations->MakePointXYZ(  0.5*width,  0.5*height, 0 );
   GEOM::GEOM_Object_var P4 = aBasicOperations->MakePointXYZ(  0.5*width, -0.5*height, 0 );
   
   GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices(P1,P2,P3,P4);
+  getDisplayer()->SetDisplayMode(3);
   getDisplayer()->SetTexture(theImgFileName.toStdString());
   
   if ( !aFace->_is_nil() )
@@ -198,8 +201,7 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects )
   }
   
   res=true;
-
+  
   return res;
 }