]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
fix issue Button Add and new icon
authorJérôme <jerome.lucas@cesgenslab.fr>
Mon, 12 Oct 2020 16:46:16 +0000 (18:46 +0200)
committerJérôme <jerome.lucas@cesgenslab.fr>
Mon, 12 Oct 2020 16:46:16 +0000 (18:46 +0200)
src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.cpp
src/FeaturesPlugin/icons/fillet_var_multiple_radiuses.png

index ff9e6856a04720dbec385694ea79f7f87562d83e..bcd3c225d21743d9d08449d0bdc8db3703a4aeb7 100644 (file)
@@ -492,36 +492,38 @@ void FeaturesPlugin_WidgetFilletMultiRadiuses::onAdd()
 {
   QModelIndex index = myDataTbl->currentIndex();
   int i  = index.row();
-  if( i != -1
-    && myDataTbl->currentItem()->isSelected() && myDataTbl->rowCount() >2 )
-  {
-    myDataTbl->blockSignals(true);
+  if( i == -1 )
+    return false; 
 
-    if ( i == myDataTbl->rowCount() -1)
-      i = myDataTbl->rowCount() - 2;
+  if( !myDataTbl->currentItem()->isSelected() && myDataTbl->rowCount() >2 ) 
+     return false;
 
-    if ( i == 0)
-      i = 1;
-    else
-      i= i+1;
-    myDataTbl->model()->insertRow(i);
+  myDataTbl->blockSignals(true);
 
-    QTableWidgetItem* aItem =0;
+  if ( i == myDataTbl->rowCount() -1)
+    i = myDataTbl->rowCount() - 2;
 
-    aItem = myDataTbl->item( i, 0 );
-    aItem = new QTableWidgetItem( "" );
-    myDataTbl->setItem(i, 0, aItem);
+  if ( i == 0)
+    i = 1;
+  else
+    i= i+1;
+  myDataTbl->model()->insertRow(i);
 
-    aItem = new QTableWidgetItem("0.1");
-    myDataTbl->setItem(i, 1, aItem);
+  QTableWidgetItem* aItem =0;
 
-    aItem = new QTableWidgetItem("0.5");
-    myDataTbl->setItem(i, 2, aItem);
-    myDataTbl->blockSignals(false);
+  aItem = myDataTbl->item( i, 0 );
+  aItem = new QTableWidgetItem( "" );
+  myDataTbl->setItem(i, 0, aItem);
 
-    emit valuesChanged();
-    myDataTbl->setCurrentCell( i, 0);
-  }
+  aItem = new QTableWidgetItem("0.1");
+  myDataTbl->setItem(i, 1, aItem);
+
+  aItem = new QTableWidgetItem("0.5");
+  myDataTbl->setItem(i, 2, aItem);
+  myDataTbl->blockSignals(false);
+
+  emit valuesChanged();
+  myDataTbl->setCurrentCell( i, 0);
 }
 
 //**********************************************************************************
index 56e4a78f3c58afd4b105c90b138ba77955d8e16f..1951a8e4febd7d184d9776986674aa1686c27d10 100644 (file)
Binary files a/src/FeaturesPlugin/icons/fillet_var_multiple_radiuses.png and b/src/FeaturesPlugin/icons/fillet_var_multiple_radiuses.png differ