From b110d7dfb19dd25be61fc2dbebbbf2fd8ba91b43 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 22 May 2015 15:28:44 +0300 Subject: [PATCH] Issue #550: Make loading of resources dependent on NEWGEOM_ROOT_DIR environment variable --- src/SketcherPrs/SketcherPrs_SymbolPrs.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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<