mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
INT PAL 0052968: 'Mesh Information' dialog shows incorrect color of group built from geometry.
This commit is contained in:
parent
7a7d7e6e48
commit
70e7642a8c
@ -30,6 +30,7 @@
|
|||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_Utils.h"
|
#include "SMESHGUI_Utils.h"
|
||||||
#include "SMESHGUI_GEOMGenUtils.h"
|
#include "SMESHGUI_GEOMGenUtils.h"
|
||||||
|
#include <SMESH_ActorUtils.h>
|
||||||
|
|
||||||
#include <GeometryGUI.h>
|
#include <GeometryGUI.h>
|
||||||
#include <GEOM_SelectionFilter.h>
|
#include <GEOM_SelectionFilter.h>
|
||||||
@ -350,11 +351,19 @@ bool SMESHGUI_GroupOnShapeOp::onApply()
|
|||||||
|
|
||||||
//printf( "apply() %s %s\n", (*geomID).latin1(), name.latin1() );
|
//printf( "apply() %s %s\n", (*geomID).latin1(), name.latin1() );
|
||||||
group = mesh->CreateGroupFromGEOM( elemType, name.toLatin1().data(), geom );
|
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 ) )
|
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( group ) )
|
||||||
anEntryList.append( aSObject->GetID().c_str() );
|
anEntryList.append( aSObject->GetID().c_str() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
SMESHGUI::Modified();
|
SMESHGUI::Modified();
|
||||||
|
|
||||||
update( UF_ObjBrowser | UF_Model );
|
update( UF_ObjBrowser | UF_Model );
|
||||||
|
Loading…
Reference in New Issue
Block a user