summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-17 15:03:24 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-17 17:34:11 +0200
commitf9e83fe5ec5550a02f8ccd9caaf0fc9b0ad35902 (patch)
treed0113e7517df0fb10fd8cab5e2204597e2ee64b1
parent647fc41763d1310479d59262734caa296f6e558d (diff)
tdf#120651 have to sort radiogroup by tab position
Change-Id: I8fcf4c4b186d8292c85babaa90e98396a5fbc71b Reviewed-on: https://gerrit.libreoffice.org/61882 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/vcl/button.hxx2
-rw-r--r--vcl/source/window/builder.cxx3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index ddc61afdd02d..38c094a2d9dc 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -268,6 +268,8 @@ public:
class VCL_DLLPUBLIC RadioButton : public Button
{
private:
+ friend class VclBuilder;
+
std::shared_ptr< std::vector< VclPtr< RadioButton > > > m_xGroup;
tools::Rectangle maStateRect;
tools::Rectangle maMouseRect;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index a57984c61925..cc4e9d18f8a4 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -479,7 +479,10 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
if (m_bLegacy)
pOne->group(*pOther);
else
+ {
pOther->group(*pOne);
+ std::stable_sort(pOther->m_xGroup->begin(), pOther->m_xGroup->end(), sortIntoBestTabTraversalOrder(this));
+ }
}
}