]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
IPAL 18203
authordmv <dmv@opencascade.com>
Thu, 6 Dec 2007 14:19:14 +0000 (14:19 +0000)
committerdmv <dmv@opencascade.com>
Thu, 6 Dec 2007 14:19:14 +0000 (14:19 +0000)
src/GEOMBase/GEOMBase_aWarningDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI.cxx

index ee936d9b7bfcf4cc06a663813f98d37be6a680d9..52a453035c3abf69d2342b3286638ab2de1f73ce 100644 (file)
@@ -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
 
index 8de1a33d4def7c65454be9b756a05af0e9849adc..51a862cb677dd83bf1f0bca9781c6c8f55bdc038 100644 (file)
@@ -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();