]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Disable Join and JoinAll operations till it will be described in BR_hydro_v_0_3_1
authorakl <akl@opencascade.com>
Fri, 22 Nov 2013 09:20:52 +0000 (09:20 +0000)
committerakl <akl@opencascade.com>
Fri, 22 Nov 2013 09:20:52 +0000 (09:20 +0000)
 the specification.

src/HYDROCurveCreator/CurveCreator_Curve.cxx
src/HYDROCurveCreator/CurveCreator_Widget.cxx

index 824338b29055919aa2f048b9efc3a97e2ef0724e..cccf4a20302532beeecfd8c54a4e79c9cc11cbc2 100644 (file)
@@ -520,20 +520,18 @@ bool CurveCreator_Curve::joinInternal( const int theISectionTo,
   return res;
 }
 
-//! Join range of sections to one section (join all sections if -1 is passed in one of arguments)
+//! Join range of sections to one section (join all sections if -1 is passed in theISectionFrom argument)
 bool CurveCreator_Curve::join( const int theISectionTo, 
                                const int theISectionFrom )
 {
+  //TODO
   bool res = false;
-  if (mySections.size() >= 2 && 
-    ( theISectionTo != theISectionFrom || (theISectionTo == -1 && theISectionFrom == -1) )) {
+  if ( theISectionTo != theISectionFrom ) {
     startOperation();
-    int aISectionTo = getNbSections()-1;
-    int aISectionFrom = 0;
     if (addEmptyDiff())
-      myListDiffs.back().init(this, CurveCreator_Operation::Join, aISectionTo, aISectionFrom);
+      myListDiffs.back().init(this, CurveCreator_Operation::Join, theISectionTo, theISectionFrom);
 
-    res = joinInternal( aISectionTo, aISectionFrom );
+    res = joinInternal( theISectionTo, theISectionFrom );
 
     finishOperation();
   }
index 56ae6c123358bb31b87f131dac788d00fccb8e93..c2fb84ce44072adb6247cd0e409838a9c502afcf 100644 (file)
@@ -186,21 +186,22 @@ CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
                         QKeySequence(Qt::ControlModifier|Qt::Key_Delete ) );
   connect(anAct, SIGNAL(triggered()), this, SLOT(onRemove()) );
   aTB->addAction(anAct);
-  aTB->addSeparator();
+  // TODO join
+  //aTB->addSeparator();
 
-  anAct = createAction( JOIN_ID, tr("JOIN"), aJoinPixmap, tr("JOIN_TLT"), 
-                        QKeySequence(Qt::ControlModifier|Qt::Key_Plus ) );
-  connect( anAct, SIGNAL(triggered()), this, SLOT(onJoin()) );
-  aTB->addAction(anAct);
-  aTB->addSeparator();
+  //anAct = createAction( JOIN_ID, tr("JOIN"), aJoinPixmap, tr("JOIN_TLT"), 
+  //                      QKeySequence(Qt::ControlModifier|Qt::Key_Plus ) );
+  //connect( anAct, SIGNAL(triggered()), this, SLOT(onJoin()) );
+  //aTB->addAction(anAct);
 
   anAct = createAction( CLEAR_ALL_ID, tr("CLEAR_ALL"), QPixmap(), tr("CLEAR_ALL_TLT"), 
                         QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Delete ) );
   connect( anAct, SIGNAL(triggered()), this, SLOT( onClearAll()) );
 
-  anAct = createAction( JOIN_ALL_ID, tr("JOIN_ALL"), QPixmap(), tr("JOIN_ALL_TLT"), 
-                        QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Plus ) );
-  connect( anAct, SIGNAL(triggered()), this, SLOT(onJoinAll()) );
+  // TODO join
+  //anAct = createAction( JOIN_ALL_ID, tr("JOIN_ALL"), QPixmap(), tr("JOIN_ALL_TLT"), 
+  //                      QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Plus ) );
+  //connect( anAct, SIGNAL(triggered()), this, SLOT(onJoinAll()) );
 
   QVBoxLayout* aSectLayout = new QVBoxLayout();
   aSectLayout->setMargin( 5 );
@@ -326,11 +327,12 @@ void CurveCreator_Widget::onSelectionChanged()
           int aSectCnt = myCurve->getNbSections();
           if( aSectCnt > 0 )
             anEnabledAct << CLEAR_ALL_ID;
-          if( aSectCnt > 1 )
-            anEnabledAct << JOIN_ALL_ID;
-          if( aSelSections.size() > 1 ){
-            anEnabledAct << JOIN_ID;
-          }
+          // TODO
+          //if( aSectCnt > 1 )
+          //  anEnabledAct << JOIN_ALL_ID;
+          //if( aSelSections.size() > 1 ){
+          //  anEnabledAct << JOIN_ID;
+          //}
         }
         break;
         case DetectionMode: {
@@ -369,9 +371,10 @@ void CurveCreator_Widget::onSelectionChanged()
     if( (myCurve->getNbSections() + myCurve->getNbPoints()) > 0 ){
       anEnabledAct << REMOVE_ALL_ID;
     }*/
-    if( myCurve->getNbSections() > 1 ){
-      anEnabledAct << JOIN_ALL_ID;
-    }
+    // TODO
+    //if( myCurve->getNbSections() > 1 ){
+    //  anEnabledAct << JOIN_ALL_ID;
+    //}
   }
   QList<ActionId> anIds = myActionMap.keys();
   for( int i = 0 ; i < anIds.size() ; i++ ){