mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
b UI_checkbox
fix bad implementation of toggle_selected
This commit is contained in:
@@ -24,15 +24,11 @@ void UI_checkbox::toggle_selected(size_t selected)
|
|||||||
{
|
{
|
||||||
if (selected >= p_options.size())
|
if (selected >= p_options.size())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (p_selected[selected] != p_selected[selected])
|
|
||||||
{
|
|
||||||
p_selected[selected] = !p_selected[selected];
|
p_selected[selected] = !p_selected[selected];
|
||||||
if (p_on_change != nullptr)
|
if (p_on_change != nullptr)
|
||||||
{
|
{
|
||||||
p_on_change(p_id, selected_text());
|
p_on_change(p_id, selected_text());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UI_checkbox::toggle_selected(std::string selected)
|
void UI_checkbox::toggle_selected(std::string selected)
|
||||||
|
|||||||
Reference in New Issue
Block a user