return aName;
}
+void SMESHGUI_GroupDlg::setDefaultName() const
+{
+ QString aResName;
+ _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+ int i=1;
+ QString aPrefix ="Group_";
+ _PTR(SObject) anObj;
+ do
+ {
+ aResName = aPrefix + QString::number( i++ );
+ anObj = aStudy->FindObject( aResName.toLatin1().data() );
+ }
+ while ( anObj );
+ myName->setText(aResName);
+}
+
//=================================================================================
// function : Init()
// purpose :
SetAppropriateActor();
setDefaultGroupColor();
+ setDefaultName();
+
SALOME_ListIO aList;
mySelectionMgr->selectedObjects( aList );
SMESH::setFileType ( aMeshGroupSO, "COULEURGROUP" );
/* init for the next operation */
- myName->setText( "" );
+ setDefaultName();
myElements->clear();
myGroup = SMESH::SMESH_Group::_nil();
myGroupOnGeom = SMESH::SMESH_GroupOnGeom::_nil();
void setGroupQColor( const QColor& );
QColor getGroupQColor() const;
-
+ void setDefaultName() const;
void setDefaultGroupColor();
void setIsApplyAndClose( const bool theFlag );