Simplify bool check in CopyInstanceDialog.cpp
Signed-off-by: Marcelo Hernandez <marcelohdez.inq@gmail.com>
This commit is contained in:
parent
4caf06bc99
commit
a89df42561
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user