From: mpa Date: Tue, 17 Nov 2015 14:37:11 +0000 (+0300) Subject: INT PAL 0052968: 'Mesh Information' dialog shows incorrect color of group built from... X-Git-Tag: V8_0_0a1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=70e7642a8cdf2191e246458ec5f8294a6ced6344;ds=sidebyside INT PAL 0052968: 'Mesh Information' dialog shows incorrect color of group built from geometry. --- diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx index 258084e05..deeaad22f 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx @@ -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();