diff options
-rw-r--r-- | include/vcl/button.hxx | 2 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 2a63e47a8c9b..4e782aa7a437 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -297,7 +297,7 @@ private: const Size& rImageSize, tools::Rectangle& rStateRect, tools::Rectangle& rMouseRect ); SAL_DLLPRIVATE void ImplDrawRadioButton(vcl::RenderContext& rRenderContext ); - SAL_DLLPRIVATE void ImplUncheckAllOther(); + SAL_DLLPRIVATE void ImplUncheckAllOther( const bool bSetStyle = true); SAL_DLLPRIVATE Size ImplGetRadioImageSize() const; SAL_DLLPRIVATE long ImplGetImageToTextDistance() const; diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 6e0e70346215..5f6194e52bd5 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1855,7 +1855,7 @@ WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nSty nStyle |= WB_TABSTOP; if ( IsChecked() && IsRadioCheckEnabled() ) - ImplUncheckAllOther(); + ImplUncheckAllOther( /*bSetStyle=*/false ); return nStyle; } @@ -2243,9 +2243,10 @@ std::vector< VclPtr<RadioButton> > RadioButton::GetRadioButtonGroup(bool bInclud return aGroup; } -void RadioButton::ImplUncheckAllOther() +void RadioButton::ImplUncheckAllOther( const bool bSetStyle ) { - mpWindowImpl->mnStyle |= WB_TABSTOP; + if ( bSetStyle ) + mpWindowImpl->mnStyle |= WB_TABSTOP; std::vector<VclPtr<RadioButton> > aGroup(GetRadioButtonGroup(false)); // iterate over radio button group and checked buttons |