svx/source/tbxctrls/grafctrl.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
New commits: commit 828a51e8617ece858b2f8bdc4a8d8759595beab0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 11 15:18:20 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed May 11 17:51:52 2022 +0200 tdf#149023 set property immediately on change and not in an idle which may be triggered on losing focus and arrive when a new shape is selected Change-Id: I7cec8f1c9bf864cdb30516dece1ef9d6b689a94e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134171 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 088b0a492c25..733cfb3af88d 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -72,7 +72,6 @@ namespace { class ImplGrafControl final : public InterimItemWindow { private: - Idle maIdle; OUString maCommand; Reference<XFrame> mxFrame; std::unique_ptr<weld::Image> mxImage; @@ -80,7 +79,7 @@ private: DECL_LINK(ValueChangedHdl, weld::MetricSpinButton&, void); DECL_LINK(KeyInputHdl, const KeyEvent&, bool); - DECL_LINK(ImplModifyHdl, Timer*, void); + void ImplModify(); public: ImplGrafControl( vcl::Window* pParent, const OUString& rCmd, const Reference< XFrame >& rFrame ); @@ -101,10 +100,10 @@ public: IMPL_LINK_NOARG(ImplGrafControl, ValueChangedHdl, weld::MetricSpinButton&, void) { - maIdle.Start(); + ImplModify(); } -IMPL_LINK_NOARG(ImplGrafControl, ImplModifyHdl, Timer*, void) +void ImplGrafControl::ImplModify() { const sal_Int64 nVal = mxField->get_value(FieldUnit::NONE); @@ -198,7 +197,6 @@ ImplGrafControl::ImplGrafControl( const OUString& rCmd, const Reference< XFrame >& rFrame) : InterimItemWindow(pParent, "svx/ui/grafctrlbox.ui", "GrafCtrlBox") - , maIdle("svx ImplGrafControl maIdle") , maCommand(rCmd) , mxFrame(rFrame) , mxImage(m_xBuilder->weld_image("image")) @@ -234,8 +232,6 @@ ImplGrafControl::ImplGrafControl( mxField->set_increments(1, 10, FieldUnit::PERCENT); } - maIdle.SetInvokeHandler( LINK( this, ImplGrafControl, ImplModifyHdl ) ); - SetSizePixel(m_xContainer->get_preferred_size()); }