Salome HOME
Merge from V6_main 01/04/2013
[modules/geom.git] / src / Material / Material_ResourceMgr.cxx
index eef31d76d03871cae756dfb78a64f739dc685057..59ca3b65fa3532e0d3d5155a5c81ca3d9d9c51dc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -140,6 +140,11 @@ QStringList Material_ResourceMgr::materials( MaterialType theType, bool theSort
     qSort( slglobal );
     qSort( sluser );
   }
+  // special processing for default material (to make it first in the list)
+  if ( slglobal.contains( "[ Default ]" ) ) {
+    slglobal.removeAll( "[ Default ]" );
+    slglobal.prepend( "[ Default ]" );
+  }
 
   // combine the materials to obtain result list
   QStringList result;