mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-07 14:13:38 -04:00
Enable the remove plugin button only when a plugin is selected.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ private slots:
|
||||
|
||||
void on_RemovePluginButton_clicked();
|
||||
|
||||
void on_PluginsList_itemSelectionChanged();
|
||||
|
||||
private:
|
||||
Ui::OpenRGBPluginsPageUi* ui;
|
||||
PluginManager* plugin_manager;
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="RemovePluginButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove Plugin</string>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user