From 9fe36f9adc966bc4c663ec640d375a3296866914 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me?= Date: Mon, 12 Oct 2020 18:46:16 +0200 Subject: [PATCH] fix issue Button Add and new icon --- ...aturesPlugin_WidgetFilletMultiRadiuses.cpp | 48 +++++++++--------- .../icons/fillet_var_multiple_radiuses.png | Bin 1108 -> 5091 bytes 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.cpp b/src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.cpp index ff9e6856a..bcd3c225d 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.cpp @@ -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); } //********************************************************************************** diff --git a/src/FeaturesPlugin/icons/fillet_var_multiple_radiuses.png b/src/FeaturesPlugin/icons/fillet_var_multiple_radiuses.png index 56e4a78f3c58afd4b105c90b138ba77955d8e16f..1951a8e4febd7d184d9776986674aa1686c27d10 100644 GIT binary patch literal 5091 zcmbVO2Q*yk+TL0S5fPF|A44Rf%;-!EqB}WCln{N4G3J=U%qT;YXwkdqy&VZ6N_0Y^ zMUbKsBzh-^9(UyAWZnC(`?tH-F5lk!`JT7G>kZV=Qe$PlzzhHYtA@I=F7*jIx|ohp z?<7~(4FF&s#V9H1C}T+WSOf(C)B|JVoOSee&bBseP<% z{WK`!H5aWUw(SdZk(r>;`!nn+hK4$Q-bTejRx5I+o<9q&9?+q9t}@l9NUhs+zfBoK z*ONTPNL?v=tyO@OVz$m?)R01|X-)_$+iBjsY-X`1wNCm1W+Zv{R+oV8ee(2|m9;I#$Gd*3-CvoGJ>KhV@L`*2b1}2=yV&GI zpVXc9`BC2U+!;PH$LAmT-BdTb6L~SKtGkWWaAC*KVZP=jYTvT{rs~1TQWd1tF)q;% zKPIb(eE`jqkn=YIrqn0#`7tOB18)UCu#^%gCOGBM@e$JzQ?JPw{o98#tILv1fUg`$ zr=#KI_5k4fKqtwRS=^PTR{og8Q?OUvWoah^({#bb{yzZ)Iu_&cSEq7|eJ>}EAJg6j z0~uUCwy${@qPhJ!DLPiLpkg5BMk}$P@ffzzX|c)tk^)`W7v8Qf;30dut#@IJ7wi(RA+OoL z@H(VcDvof&0%l&Dd=b;&mf=kk=f<^t&Xzi_t{SyA$txP1tl9;>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