From 86b7c69f333cfebb13268c91fa8c4ca6549a38f6 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 29 Mar 2013 15:55:03 +0000 Subject: [PATCH] From CoTech 51: change default preferences --- resources/SalomeApp.xml.in | 2 +- src/Material/Material_ResourceMgr.cxx | 5 +++++ src/Material/resources/SalomeMaterial.xml | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index 2d8e9c623..fbd07f25b 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -58,7 +58,7 @@ - + diff --git a/src/Material/Material_ResourceMgr.cxx b/src/Material/Material_ResourceMgr.cxx index 60748c526..59ca3b65f 100644 --- a/src/Material/Material_ResourceMgr.cxx +++ b/src/Material/Material_ResourceMgr.cxx @@ -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; diff --git a/src/Material/resources/SalomeMaterial.xml b/src/Material/resources/SalomeMaterial.xml index a8588b66f..7cf7a8638 100644 --- a/src/Material/resources/SalomeMaterial.xml +++ b/src/Material/resources/SalomeMaterial.xml @@ -44,6 +44,27 @@ +
+ + + + + + + + + + + + + + + + + + + +
-- 2.39.2