X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_GroupOnShapeDlg.cxx;h=deeaad22ff1481a30d5eeb513726c2c7683933f1;hp=c31a07c449810fb5e3026b632a83119023b997f6;hb=70e7642a8cdf2191e246458ec5f8294a6ced6344;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx index c31a07c44..deeaad22f 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -30,6 +30,7 @@ #include "SMESHGUI.h" #include "SMESHGUI_Utils.h" #include "SMESHGUI_GEOMGenUtils.h" +#include #include #include @@ -350,9 +351,17 @@ bool SMESHGUI_GroupOnShapeOp::onApply() //printf( "apply() %s %s\n", (*geomID).latin1(), name.latin1() ); group = mesh->CreateGroupFromGEOM( elemType, name.toLatin1().data(), geom ); - if( !group->_is_nil() ) + if( !group->_is_nil() ) { + // set default color for created group + QColor c = SMESH::GetColor( "SMESH", "default_grp_color" ); + SALOMEDS::Color aColor; + aColor.R = c.redF(); + aColor.G = c.greenF(); + aColor.B = c.blueF(); + group->SetColor(aColor); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( group ) ) anEntryList.append( aSObject->GetID().c_str() ); + } } } SMESHGUI::Modified();