]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #550: Make loading of resources dependent on NEWGEOM_ROOT_DIR environment variable
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 22 May 2015 12:28:44 +0000 (15:28 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 22 May 2015 12:28:44 +0000 (15:28 +0300)
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp

index d5119b1b15b8245a8a1281bee8510306cb589e7c..224a4b1dc36bbfac20152273288ea4042be96ce0 100644 (file)
@@ -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<<aMsg<<endl;
-    Events_Error::send(aMsg);
-    myIconsMap[iconName()] = Handle(Image_AlienPixMap)();
   }
+  static const char aMsg[] = "Error! constraint images are not found";
+  cout<<aMsg<<endl;
+  Events_Error::send(aMsg);
+  myIconsMap[iconName()] = Handle(Image_AlienPixMap)();
   return Handle(Image_AlienPixMap)();
 }