mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
GComboBox: Include the selected index with the on_change notification
This will be useful for clients that need to fetch additional data from the model on selection change.
This commit is contained in:
parent
ffff150435
commit
6311a617be
3 changed files with 5 additions and 5 deletions
|
@ -37,7 +37,7 @@ public:
|
|||
combo->set_only_allow_values_from_model(true);
|
||||
combo->set_model(adopt(*new BoolValuesModel));
|
||||
combo->on_return_pressed = [this] { commit(); };
|
||||
combo->on_change = [this](auto&) { commit(); };
|
||||
combo->on_change = [this](auto&, auto&) { commit(); };
|
||||
return combo;
|
||||
}
|
||||
virtual GVariant value() const override { return static_cast<const GComboBox*>(widget())->text() == "true"; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue