Lines 981-989
Link Here
|
981 |
{ |
981 |
{ |
982 |
if( ui.Devices_List->currentItem()->data(512).toString() == "device" + QString::number(fx) ) |
982 |
if( ui.Devices_List->currentItem()->data(512).toString() == "device" + QString::number(fx) ) |
983 |
{ |
983 |
{ |
984 |
finded = true; |
|
|
985 |
|
986 |
Storage_Devices.removeAt( fx ); |
984 |
Storage_Devices.removeAt( fx ); |
|
|
985 |
ui.Devices_List->takeItem( ui.Devices_List->currentRow() ); |
986 |
finded = true; |
987 |
break; |
987 |
} |
988 |
} |
988 |
} |
989 |
} |
989 |
|
990 |
|
Lines 993-1002
Link Here
|
993 |
"Incorrect Device!" ); |
994 |
"Incorrect Device!" ); |
994 |
return; |
995 |
return; |
995 |
} |
996 |
} |
|
|
997 |
else |
998 |
{ |
999 |
// Rename items |
1000 |
for( int ix = 0, count = 0; ix < ui.Devices_List->count(); ++ix ) |
1001 |
{ |
1002 |
if( ui.Devices_List->item(ix)->data(512).toString().contains("device") ) |
1003 |
{ |
1004 |
ui.Devices_List->item(ix)->setData( 512, QString("device%1").arg(count) ); |
1005 |
++count; |
1006 |
} |
1007 |
} |
1008 |
|
1009 |
emit Device_Changet(); |
1010 |
return; |
1011 |
} |
996 |
} |
1012 |
} |
997 |
|
1013 |
|
998 |
ui.Devices_List->takeItem( ui.Devices_List->currentRow() ); |
1014 |
ui.Devices_List->takeItem( ui.Devices_List->currentRow() ); |
999 |
|
|
|
1000 |
emit Device_Changet(); |
1015 |
emit Device_Changet(); |
1001 |
} |
1016 |
} |
1002 |
|
1017 |
|