Bug IPAL20038 Name disappears in Create Group on Mesh dialog box when Group type is changed.

This commit is contained in:
dmv 2008-07-01 12:38:09 +00:00
parent 4f55f53101
commit 15ec793e1d

View File

@ -517,7 +517,6 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup)
myName->setText(theGroup->GetName()); myName->setText(theGroup->GetName());
myName->home(false); myName->home(false);
myOldName = myName->text();
SALOMEDS::Color aColor = theGroup->GetColor(); SALOMEDS::Color aColor = theGroup->GetColor();
setGroupColor( aColor ); setGroupColor( aColor );
@ -620,6 +619,7 @@ void SMESHGUI_GroupDlg::updateButtons()
//================================================================================= //=================================================================================
void SMESHGUI_GroupDlg::onNameChanged (const QString& text) void SMESHGUI_GroupDlg::onNameChanged (const QString& text)
{ {
myOldName = myName->text();
updateButtons(); updateButtons();
} }
@ -646,8 +646,7 @@ void SMESHGUI_GroupDlg::onGrpTypeChanged (int id)
{ {
if (myGrpTypeId != id) { if (myGrpTypeId != id) {
myWGStack->raiseWidget( id ); myWGStack->raiseWidget( id );
if (id == 0) myName->setText(myOldName);
myName->setText(myOldName);
onSelectGeomGroup(id == 1); onSelectGeomGroup(id == 1);
} }
myGrpTypeId = id; myGrpTypeId = id;