Enable the remove plugin button only when a plugin is selected.
This commit is contained in:
parent
04c430e31b
commit
70a2fa81c8
3 changed files with 13 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue