mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Preferences: Fix detecting active profile
Starting and active profile can be different when passing the profile as a cli flag.
This commit is contained in:
parent
4878265ff6
commit
1695c9bd62
|
@ -822,16 +822,10 @@ void Preferences::deleteProfile()
|
|||
|
||||
void Preferences::startProfileIndexChanged(int index)
|
||||
{
|
||||
// Index 0 is current profile
|
||||
const bool current = ui->startProfile->itemText(index) == ProfileManager::currentProfile();
|
||||
|
||||
ui->deleteProfile->setEnabled(index != 0);
|
||||
|
||||
if (index == 0) {
|
||||
ui->cannotDeleteActiveProfileLabel->setText(tr("Note: You cannot delete active profile."));
|
||||
}
|
||||
else {
|
||||
ui->cannotDeleteActiveProfileLabel->setText(" ");
|
||||
}
|
||||
ui->deleteProfile->setEnabled(!current);
|
||||
ui->cannotDeleteActiveProfileLabel->setText(current ? tr("Note: You cannot delete active profile.") : QString());
|
||||
}
|
||||
|
||||
void Preferences::closeEvent(QCloseEvent* event)
|
||||
|
|
Loading…
Reference in New Issue
Block a user