From: dmv Date: Thu, 6 Dec 2007 14:19:14 +0000 (+0000) Subject: IPAL 18203 X-Git-Tag: V3_2_9~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3efdeeeb0189f813a52f403b3188f29ee68e1719;p=modules%2Fgeom.git IPAL 18203 --- diff --git a/src/GEOMBase/GEOMBase_aWarningDlg.cxx b/src/GEOMBase/GEOMBase_aWarningDlg.cxx index ee936d9b7..52a453035 100644 --- a/src/GEOMBase/GEOMBase_aWarningDlg.cxx +++ b/src/GEOMBase/GEOMBase_aWarningDlg.cxx @@ -46,7 +46,10 @@ GEOMBase_aWarningDlg::GEOMBase_aWarningDlg( QWidget* parent, const char* name, c { if(!name) setName( "Warning" ); - resize(296, 150); + if ( theNum < 15 ) + resize(296, (120 + (14*theNum)) ); + else + resize(296, 300); setCaption(name); /* appears on the title bar */ setSizeGripEnabled(TRUE); @@ -65,13 +68,17 @@ GEOMBase_aWarningDlg::GEOMBase_aWarningDlg( QWidget* parent, const char* name, c mainGrpLayout->setMargin(11); topLayout->addWidget(mainGrp, 0, 0); + QLabel* TextLabel = new QLabel(mainGrp, "TextLabel"); + TextLabel->setText( QObject::tr( "GEOM_REALLY_DELETE" ).arg( theNum ) ); + mainGrpLayout->addWidget(TextLabel, 0, 0); QScrollView* viewer = new QScrollView (mainGrp, "viewer"); viewer->setResizePolicy( QScrollView::AutoOneFit ); QLabel* TextLabel1 = new QLabel(viewer, "TextLabel1"); - TextLabel1->setText( QObject::tr( "GEOM_REALLY_DELETE" ).arg( theNum ).arg( theText ) ); + TextLabel1->setText( theText ); + TextLabel1->setAlignment(Qt::AlignTop); viewer->addChild(TextLabel1); - mainGrpLayout->addWidget(viewer, 0, 0); + mainGrpLayout->addWidget(viewer, 1, 0); //Create Buttons diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 8de1a33d4..51a862cb6 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -317,15 +317,26 @@ void GEOMToolsGUI::OnEditDelete() // VSR 17/11/04: check if all objects selected belong to GEOM component <-- finish QString aNameList; int nbSel = 0; + Handle(SALOME_InteractiveObject) anIObject; for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - Handle(SALOME_InteractiveObject) io = It.Value(); - QString aName = io->getName(); + QString aName = It.Value()->getName(); if ( aName != "" && aName.ref(0) != '*') { - aNameList.append("\n - " + aName); + aNameList.append(" - " + aName + "\n"); nbSel++; } + anIObject = It.Value(); + } + // Append Child Names of Last Selected Object + _PTR(SObject) obj ( aStudy->FindObjectID( anIObject->getEntry() ) ); + for (_PTR(ChildIterator) iit (aStudy->NewChildIterator(obj)); iit->More(); iit->Next()) { + _PTR(SObject) child (iit->Value()); + QString aName = child->GetName(); + if (aName != "" && aName.ref(0) != '*') { + aNameList.append(" - " + aName + "\n"); + nbSel++; } + } GEOMBase_aWarningDlg* Dialog = new GEOMBase_aWarningDlg( app->desktop(), QObject::tr( "GEOM_WRN_WARNING" ), aNameList, nbSel); int r = Dialog->exec();