From: vsv Date: Fri, 22 May 2015 12:28:44 +0000 (+0300) Subject: Issue #550: Make loading of resources dependent on NEWGEOM_ROOT_DIR environment variable X-Git-Tag: V_1.2.0~112 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b110d7dfb19dd25be61fc2dbebbbf2fd8ba91b43;p=modules%2Fshaper.git Issue #550: Make loading of resources dependent on NEWGEOM_ROOT_DIR environment variable --- diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp index d5119b1b1..224a4b1dc 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp @@ -249,9 +249,11 @@ Handle(Image_AlienPixMap) SketcherPrs_SymbolPrs::icon() if (myIconsMap.count(iconName()) == 1) { return myIconsMap[iconName()]; } - char* aEnv = getenv("NewGeomResources"); + char* aEnv = getenv("NEWGEOM_ROOT_DIR"); if (aEnv != NULL) { TCollection_AsciiString aFile(aEnv); + aFile+=FSEP; + aFile+="resources"; aFile += FSEP; aFile += iconName(); Handle(Image_AlienPixMap) aPixMap = new Image_AlienPixMap(); @@ -259,12 +261,11 @@ Handle(Image_AlienPixMap) SketcherPrs_SymbolPrs::icon() myIconsMap[iconName()] = aPixMap; return aPixMap; } - } else { - static const char aMsg[] = "Error! NewGeomResources environment variable is not defined: constraint images are not found"; - cout<