Improve working with measurements in Tape.

* Disable remove button if a table is empty.
* Switch to previous measurement if remove the last in the list.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-12-05 10:27:33 +02:00
parent 43f7d7d733
commit c87a15b99c

View File

@ -1117,7 +1117,7 @@ void TMainWindow::Remove()
if (ui->tableWidget->rowCount() > 0)
{
ui->tableWidget->selectRow(row);
ui->tableWidget->selectRow(row >= ui->tableWidget->rowCount() ? ui->tableWidget->rowCount() - 1 : row);
}
else
{
@ -2581,6 +2581,8 @@ void TMainWindow::MFields(bool enabled)
ui->toolButtonFindPrevious->setEnabled(false);
ui->toolButtonFindNext->setEnabled(false);
}
Controls();
}
//---------------------------------------------------------------------------------------------------------------------