svx/source/tbxctrls/grafctrl.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 935844c8133b90c4301b950d98f4e61eecb6bcf5
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed May 11 15:18:20 2022 +0100
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Thu May 12 03:25:11 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/+/134211
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index f5dbb6620f57..3e682fba5111 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -68,7 +68,6 @@ namespace {
 class ImplGrafControl final : public InterimItemWindow
 {
 private:
-    Idle maIdle;
     OUString maCommand;
     Reference<XFrame> mxFrame;
     std::unique_ptr<weld::Image> mxImage;
@@ -76,7 +75,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 );
@@ -97,10 +96,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);
 
@@ -230,8 +229,6 @@ ImplGrafControl::ImplGrafControl(
         mxField->set_increments(1, 10, FieldUnit::PERCENT);
     }
 
-    maIdle.SetInvokeHandler( LINK( this, ImplGrafControl, ImplModifyHdl ) );
-
     SetSizePixel(m_xContainer->get_preferred_size());
 }
 

Reply via email to