Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
INT PAL 0052683: Parameter "Color group" in the "Create Group" dialog box is empty
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_GroupDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx
index 30d77de3b69dbcccedafc511c53c96a6d4a1bd69..4b33a586b5462396fb917097c7853be4b042fdcf 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-730,6
+730,17
@@
void SMESHGUI_GroupDlg::updateButtons()
}
}
}
}
+ bool meshHasGeom = ( myMesh->_is_nil() || myMesh->HasShapeToMesh() );
+ if ( myGrpTypeId != 1 )
+ {
+ myGrpTypeGroup->button(1)->setEnabled( meshHasGeom );
+ }
+ else
+ {
+ myGeomGroupBtn->setEnabled( meshHasGeom );
+ myGeomGroupLine->setEnabled( meshHasGeom );
+ }
+
myOKBtn->setEnabled(enable);
myApplyBtn->setEnabled(enable);
}
myOKBtn->setEnabled(enable);
myApplyBtn->setEnabled(enable);
}
@@
-1135,6
+1146,8
@@
bool SMESHGUI_GroupDlg::onApply()
if( aMeshGroupSO )
anEntryList.append( aMeshGroupSO->GetID().c_str() );
if( aMeshGroupSO )
anEntryList.append( aMeshGroupSO->GetID().c_str() );
+ resultGroup->SetName(SMESH::toUtf8(myName->text().trimmed()));
+
if ( isCreation )
{
SMESH::setFileType ( aMeshGroupSO, "COULEURGROUP" );
if ( isCreation )
{
SMESH::setFileType ( aMeshGroupSO, "COULEURGROUP" );
@@
-1151,8
+1164,6
@@
bool SMESHGUI_GroupDlg::onApply()
}
else
{
}
else
{
- resultGroup->SetName(SMESH::toUtf8(myName->text()));
-
if ( aMeshGroupSO )
{
if ( SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str()))
if ( aMeshGroupSO )
{
if ( SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str()))
@@
-1186,7
+1197,10
@@
bool SMESHGUI_GroupDlg::onApply()
}
// update a visible group accoding to a changed contents
if ( !isConversion && anActor->GetVisibility() )
}
// update a visible group accoding to a changed contents
if ( !isConversion && anActor->GetVisibility() )
+ {
SMESH::Update( anIO, true );
SMESH::Update( anIO, true );
+ SMESH::RepaintCurrentView();
+ }
}
}
}
}
}
}
@@
-1315,6
+1329,9
@@
void SMESHGUI_GroupDlg::onObjectSelectionChanged()
// any visible actor of group or submesh of myMesh
SetAppropriateActor();
// any visible actor of group or submesh of myMesh
SetAppropriateActor();
+ setDefaultGroupColor();
+ setDefaultName();
+
aString = aList.First()->getName();
myMeshGroupLine->setText(aString);
myMeshGroupLine->home( false );
aString = aList.First()->getName();
myMeshGroupLine->setText(aString);
myMeshGroupLine->home( false );
@@
-1751,10
+1768,10
@@
void SMESHGUI_GroupDlg::setFilters()
myFilterDlg->SetEnabled( /*setInViewer=*/isStandalone,
/*diffSources=*/isStandalone );
myFilterDlg->SetMesh( myMesh );
myFilterDlg->SetEnabled( /*setInViewer=*/isStandalone,
/*diffSources=*/isStandalone );
myFilterDlg->SetMesh( myMesh );
+ myFilterDlg->SetGroup( myGroupOnFilter );
myFilterDlg->SetSelection();
myFilterDlg->SetSourceWg( myElements, false );
myFilterDlg->SetSelection();
myFilterDlg->SetSourceWg( myElements, false );
-
myFilterDlg->show();
}
myFilterDlg->show();
}