[tracking] Can't uncheck 'none' box by itself
- If the 'no tracking' box is checked, then the way to uncheck it is to tick some **other** box. - It doesn't make sense to unselect 'none' and then have .. none selected.
This commit is contained in:
parent
47b0fa5d55
commit
8ad221311d
@ -40,6 +40,7 @@ TrackingPage::TrackingPage( Config* config, QWidget* parent )
|
|||||||
CALAMARES_RETRANSLATE_SLOT( &TrackingPage::retranslate );
|
CALAMARES_RETRANSLATE_SLOT( &TrackingPage::retranslate );
|
||||||
|
|
||||||
ui->noneCheckBox->setChecked( true );
|
ui->noneCheckBox->setChecked( true );
|
||||||
|
ui->noneCheckBox->setEnabled( false );
|
||||||
connect( ui->noneCheckBox, &QCheckBox::stateChanged, this, &TrackingPage::buttonNoneChecked );
|
connect( ui->noneCheckBox, &QCheckBox::stateChanged, this, &TrackingPage::buttonNoneChecked );
|
||||||
|
|
||||||
// Each "panel" of configuration has the same kind of setup,
|
// Each "panel" of configuration has the same kind of setup,
|
||||||
@ -124,6 +125,7 @@ TrackingPage::buttonNoneChecked( int state )
|
|||||||
ui->installCheckBox->setChecked( false );
|
ui->installCheckBox->setChecked( false );
|
||||||
ui->machineCheckBox->setChecked( false );
|
ui->machineCheckBox->setChecked( false );
|
||||||
ui->userCheckBox->setChecked( false );
|
ui->userCheckBox->setChecked( false );
|
||||||
|
ui->noneCheckBox->setEnabled( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +135,7 @@ TrackingPage::buttonChecked( int state )
|
|||||||
if ( state )
|
if ( state )
|
||||||
{
|
{
|
||||||
// Can't have none checked, if another one is
|
// Can't have none checked, if another one is
|
||||||
|
ui->noneCheckBox->setEnabled( true );
|
||||||
ui->noneCheckBox->setChecked( false );
|
ui->noneCheckBox->setChecked( false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -140,6 +143,7 @@ TrackingPage::buttonChecked( int state )
|
|||||||
if ( !anyOtherChecked() )
|
if ( !anyOtherChecked() )
|
||||||
{
|
{
|
||||||
ui->noneCheckBox->setChecked( true );
|
ui->noneCheckBox->setChecked( true );
|
||||||
|
ui->noneCheckBox->setEnabled( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user