From: vsr Date: Fri, 28 Sep 2018 08:58:25 +0000 (+0300) Subject: IPAL54434: TC9.2.0: GEOM: Textured point marker is not set X-Git-Tag: V9_2_0a2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c4999d16551e5ac1eae8329faf1ab65cf023a844;p=modules%2Fgeom.git IPAL54434: TC9.2.0: GEOM: Textured point marker is not set --- diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index ffb9262a8..7e4acf07f 100755 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -138,8 +138,6 @@ extern "C" { } } -GeometryGUI::TextureMap GeometryGUI::myTextureMap; - GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil(); GEOM::GEOM_Gen_var GeometryGUI::GetGeomGen() @@ -2220,25 +2218,20 @@ QString GeometryGUI::engineIOR() const Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture (int theId, int& theWidth, int& theHeight) { theWidth = theHeight = 0; - Handle(TColStd_HArray1OfByte) aTexture; - aTexture = myTextureMap[ theId ]; - if ( aTexture.IsNull() ) { - GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations(); - if ( !aInsOp->_is_nil() ) { - CORBA::Long aWidth, aHeight; - SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight ); - if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) { - theWidth = aWidth; - theHeight = aHeight; - - aTexture = new TColStd_HArray1OfByte (1, aStream->length()); - - for ( CORBA::ULong i = 0; i < aStream->length(); i++) - aTexture->SetValue( i+1, (Standard_Byte)aStream[i] ); - myTextureMap[ theId ] = aTexture; - } + GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations(); + if ( !aInsOp->_is_nil() ) { + CORBA::Long aWidth, aHeight; + SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight ); + if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) { + theWidth = aWidth; + theHeight = aHeight; + + aTexture = new TColStd_HArray1OfByte (1, aStream->length()); + + for ( CORBA::ULong i = 0; i < aStream->length(); i++) + aTexture->SetValue( i+1, (Standard_Byte)aStream[i] ); } } return aTexture; diff --git a/src/GEOMGUI/GeometryGUI.h b/src/GEOMGUI/GeometryGUI.h index 9d6165611..fd13d9374 100644 --- a/src/GEOMGUI/GeometryGUI.h +++ b/src/GEOMGUI/GeometryGUI.h @@ -211,8 +211,6 @@ public: private: - typedef QMap TextureMap; - typedef QMap GUIMap; typedef QPair PluginAction; @@ -221,7 +219,6 @@ private: QDialog* myActiveDialogBox; // active dialog box gp_Ax3 myWorkingPlane; //QMap myRules; // popup rules - static TextureMap myTextureMap; // texture map QMap myPluginActions; // plugin actions QMap myPluginLibs; // plugin name to plugin client library