Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/geom.git] / src / BooleanGUI / BooleanGUI_Dialog.cxx
index b777cddd43472d82efc6c0b25f5fa4edf0560c21..39826043a23424f004dcdc5446a2f802130d15a6 100644 (file)
@@ -54,31 +54,31 @@ BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, GeometryGUI* theGe
   QString aTitle, aCaption;
   switch ( myOperation )
   {
-       case BooleanGUI::COMMON:
-         image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_COMMON")));
-                       aTitle = tr("GEOM_COMMON");
-                       aCaption = tr("GEOM_COMMON_TITLE");
-                       setHelpFileName("common.htm");
-                       break;
-               case BooleanGUI::CUT:
-         image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CUT")));
-                       aTitle = tr("GEOM_CUT");
-                       aCaption = tr("GEOM_CUT_TITLE");
-                       setHelpFileName("cut.htm");
-                       break;
-               case BooleanGUI::FUSE:
-         image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FUSE")));
-                       aTitle = tr("GEOM_FUSE");
-                       aCaption = tr("GEOM_FUSE_TITLE");
-                       setHelpFileName("fuse.htm");
-                       break;
-               case BooleanGUI::SECTION:
-         image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SECTION")));
-                       aTitle = tr("GEOM_SECTION");
-                       aCaption = tr("GEOM_SECTION_TITLE");
-                       setHelpFileName("section.htm");
-                       break;
-       }
+    case BooleanGUI::COMMON:
+      image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_COMMON")));
+      aTitle = tr("GEOM_COMMON");
+      aCaption = tr("GEOM_COMMON_TITLE");
+      setHelpFileName("common_operation_page.html");
+      break;
+    case BooleanGUI::CUT:
+      image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CUT")));
+      aTitle = tr("GEOM_CUT");
+      aCaption = tr("GEOM_CUT_TITLE");
+      setHelpFileName("cut_operation_page.html");
+      break;
+    case BooleanGUI::FUSE:
+      image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FUSE")));
+      aTitle = tr("GEOM_FUSE");
+      aCaption = tr("GEOM_FUSE_TITLE");
+      setHelpFileName("fuse_operation_page.html");
+      break;
+    case BooleanGUI::SECTION:
+      image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SECTION")));
+      aTitle = tr("GEOM_SECTION");
+      aCaption = tr("GEOM_SECTION_TITLE");
+      setHelpFileName("section_opeartion_page.html");
+      break;
+  }
   QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
 
   setCaption( aCaption );
@@ -148,6 +148,16 @@ void BooleanGUI_Dialog::Init()
 
   initName( GroupConstructors->title() );
 
+  setTabOrder (RadioButton1, ResultName );
+  setTabOrder (ResultName, myGroup->PushButton1);
+  setTabOrder (myGroup->PushButton1, myGroup->PushButton2);
+  setTabOrder (myGroup->PushButton2, buttonOk);
+  setTabOrder (buttonOk, buttonApply);
+  setTabOrder (buttonApply, buttonCancel);
+  setTabOrder (buttonCancel, buttonHelp);
+
+  RadioButton1->setFocus();
+
   globalSelection( GEOM_ALLSHAPES );
 }
 
@@ -273,6 +283,12 @@ GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation()
 //=================================================================================
 bool BooleanGUI_Dialog::isValid( QString& msg )
 {
+  Handle(SALOME_InteractiveObject) IO = firstIObject();
+  Standard_Boolean testResult;
+  GEOM::GEOM_Object_var anObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult );
+  if ( !testResult || anObject->_is_nil() )
+    return false;
+
   return !CORBA::is_nil( myObject1 ) && !CORBA::is_nil( myObject2 );
 }