Enable the remove plugin button only when a plugin is selected.

This commit is contained in:
morg 2021-09-07 13:13:44 +02:00 committed by Adam Honse
parent 04c430e31b
commit 70a2fa81c8
3 changed files with 13 additions and 0 deletions

View file

@ -298,3 +298,11 @@ void Ui::OpenRGBPluginsPage::on_EnableButton_clicked(OpenRGBPluginsEntry* entry)
plugin_manager->UnloadPlugin(entry_path);
}
}
void Ui::OpenRGBPluginsPage::on_PluginsList_itemSelectionChanged()
{
/*-----------------------------------------------------*\
| Enable the remove button when there's a selected item |
\*-----------------------------------------------------*/
ui->RemovePluginButton->setEnabled(!ui->PluginsList->selectedItems().empty());
}