1
Fork 0
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:
Andreas Kling 2019-08-05 18:42:51 +02:00
parent ffff150435
commit 6311a617be
3 changed files with 5 additions and 5 deletions

View file

@ -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"; }