diff --git a/doc/salome/gui/GEOM/images/editgroup.png b/doc/salome/gui/GEOM/images/editgroup.png
index 25a55f8a7..935fabeac 100755
Binary files a/doc/salome/gui/GEOM/images/editgroup.png and b/doc/salome/gui/GEOM/images/editgroup.png differ
diff --git a/doc/salome/gui/GEOM/images/geomcreategroup.png b/doc/salome/gui/GEOM/images/geomcreategroup.png
index 8e0706a40..b74b00dfb 100755
Binary files a/doc/salome/gui/GEOM/images/geomcreategroup.png and b/doc/salome/gui/GEOM/images/geomcreategroup.png differ
diff --git a/doc/salome/gui/GEOM/input/working_with_groups.doc b/doc/salome/gui/GEOM/input/working_with_groups.doc
index a2e7d5360..7c671fe64 100644
--- a/doc/salome/gui/GEOM/input/working_with_groups.doc
+++ b/doc/salome/gui/GEOM/input/working_with_groups.doc
@@ -39,6 +39,12 @@ sometimes purely geometrical coincidence is not enough and it
is necessary to work with shapes, which actually belong both
to the main and the second shape.
+
You can selectively display the selected elements using the following buttons:
+
+- Show only selected - displays only the subshapes selected in the list box.
+- Hide selected - hides the subshapes selected in the list box.
+- Show all sub-shapes - displays only the subshapes of the Main Shape.
+
You can select the elements of your group in two ways:
- You can select them manually in the 3D Viewer, and add to the
diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx
index d49e014a7..2586fee84 100644
--- a/src/GroupGUI/GroupGUI_GroupDlg.cxx
+++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx
@@ -111,30 +111,33 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
myMainName->setReadOnly(true);
myMainName->setEnabled(myMode == CreateGroup);
- QLabel* aSecondLabel = new QLabel(tr("SECOND_SHAPE"), GroupMedium);
-
- mySelBtn2 = new QPushButton(GroupMedium);
- mySelBtn2->setIcon(iconSelect);
- mySelBtn2->setEnabled(false);
-
- myShape2Name = new QLineEdit(GroupMedium);
- myShape2Name->setReadOnly(true);
- myShape2Name->setEnabled(false);
-
myRestrictGroupBox = new QGroupBox(tr("SHAPE_SEL_RESTR"), GroupMedium);
myRestrictGroup = new QButtonGroup(myRestrictGroupBox);
QRadioButton* allSubs = new QRadioButton(tr("NO_RESTR") , myRestrictGroupBox);
QRadioButton* inPlaceSubs = new QRadioButton(tr("GEOM_PARTS_OF_SHAPE2"), myRestrictGroupBox);
QRadioButton* shape2Subs = new QRadioButton(tr("SUBSHAPES_OF_SHAPE2") , myRestrictGroupBox);
- QVBoxLayout* aRestrictLayout = new QVBoxLayout(myRestrictGroupBox);
+ QGridLayout* aRestrictLayout = new QGridLayout(myRestrictGroupBox);
+
+ QLabel* aSecondLabel = new QLabel(tr("SECOND_SHAPE"), myRestrictGroupBox);
+ mySelBtn2 = new QPushButton(myRestrictGroupBox);
+ mySelBtn2->setIcon(iconSelect);
+ mySelBtn2->setEnabled(false);
+ myShape2Name = new QLineEdit(myRestrictGroupBox);
+ myShape2Name->setReadOnly(true);
+ myShape2Name->setEnabled(false);
+
aRestrictLayout->setMargin(9);
aRestrictLayout->setSpacing(6);
- aRestrictLayout->addWidget(allSubs);
- aRestrictLayout->addWidget(inPlaceSubs);
- aRestrictLayout->addWidget(shape2Subs);
- myRestrictGroup->addButton(allSubs, ALL_SUBSHAPES);
- myRestrictGroup->addButton(inPlaceSubs, GET_IN_PLACE);
- myRestrictGroup->addButton(shape2Subs, SUBSHAPES_OF_SHAPE2);
+ aRestrictLayout->addWidget(allSubs, 0, 0, 1, 3);
+ aRestrictLayout->addWidget(inPlaceSubs, 1, 0, 1, 3);
+ aRestrictLayout->addWidget(shape2Subs, 2, 0, 1, 3);
+ aRestrictLayout->addWidget(aSecondLabel, 3, 0);
+ aRestrictLayout->addWidget(mySelBtn2, 3, 1);
+ aRestrictLayout->addWidget(myShape2Name, 3, 2);
+ myRestrictGroup->addButton(allSubs, ALL_SUBSHAPES);
+ myRestrictGroup->addButton(inPlaceSubs, GET_IN_PLACE);
+ myRestrictGroup->addButton(shape2Subs, SUBSHAPES_OF_SHAPE2);
+ myRestrictGroupBox->setEnabled(!CORBA::is_nil(myMainObj));
allSubs->setChecked(true);
myShowOnlyBtn = new QPushButton(tr("Show only selected"), GroupMedium);
@@ -154,21 +157,20 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
aMedLayout->addWidget(aMainLabel, 0, 0);
aMedLayout->addWidget(mySelBtn, 0, 1);
aMedLayout->addWidget(myMainName, 0, 2, 1, 2);
- aMedLayout->addWidget(aSecondLabel, 1, 0);
- aMedLayout->addWidget(mySelBtn2, 1, 1);
- aMedLayout->addWidget(myShape2Name, 1, 2, 1, 2);
- aMedLayout->addWidget(myRestrictGroupBox, 2, 0, 3, 3);
+ aMedLayout->addWidget(myRestrictGroupBox, 1, 0, 4, 3);
- aMedLayout->addWidget(myShowOnlyBtn, 2, 3);
- aMedLayout->addWidget(myHideSelBtn, 3, 3);
- aMedLayout->addWidget(myShowAllBtn, 4, 3);
+ aMedLayout->addWidget(myShowOnlyBtn, 1, 3);
+ aMedLayout->addWidget(myHideSelBtn, 2, 3);
+ aMedLayout->addWidget(myShowAllBtn, 3, 3);
+ aMedLayout->addWidget(myIdList, 5, 0, 4, 3);
aMedLayout->addWidget(mySelAllBtn, 5, 3);
aMedLayout->addWidget(myAddBtn, 6, 3);
aMedLayout->addWidget(myRemBtn, 7, 3);
- aMedLayout->addWidget(myIdList, 5, 0, 3, 3);
- aMedLayout->setRowStretch(5, 1);
+ aMedLayout->setColumnStretch( 2, 5 );
+ aMedLayout->setRowStretch(5, 5);
+ aMedLayout->setRowStretch(8, 5);
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
layout->setMargin(0); layout->setSpacing(6);