sync get_selected_id with get_active_id
Change-Id: I983cc45d13e02a020f608b8e9abfd2f12f7b10f5
Reviewed-on: https://gerrit.libreoffice.org/68741
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 6000bb5..5511879 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -608,7 +608,11 @@ public:
//by id
virtual OUString get_id(int pos) const = 0;
virtual int find_id(const OUString& rId) const = 0;
OUString get_selected_id() const { return get_id(get_selected_index()); }
OUString get_selected_id() const
{
int pos = get_selected_index();
return pos == -1 ? OUString() : get_id(pos);
}
void select_id(const OUString& rId) { select(find_id(rId)); }
//via iter