Simplify bool check in CopyInstanceDialog.cpp

Signed-off-by: Marcelo Hernandez <marcelohdez.inq@gmail.com>
This commit is contained in:
Marcelo Hernandez 2022-10-24 19:27:21 -04:00 committed by Marcelo Hernandez
parent 4caf06bc99
commit a89df42561
No known key found for this signature in database
GPG Key ID: 1405A0E7C9C4D61D

View File

@ -141,14 +141,7 @@ void CopyInstanceDialog::checkAllCheckboxes(const bool& b)
// Sets b to true if state is a checked checkbox // Sets b to true if state is a checked checkbox
void CopyInstanceDialog::checkBool(bool& b, const int& state) void CopyInstanceDialog::checkBool(bool& b, const int& state)
{ {
if(state == Qt::Unchecked) b = (state == Qt::Checked);
{
b = false;
}
else if(state == Qt::Checked)
{
b = true;
}
// Have "Select all" checkbox checked if all options are already checked: // Have "Select all" checkbox checked if all options are already checked:
ui->selectAllCheckbox->blockSignals(true); ui->selectAllCheckbox->blockSignals(true);