diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-11 15:18:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-11 17:51:52 +0200 |
commit | 828a51e8617ece858b2f8bdc4a8d8759595beab0 (patch) | |
tree | a7918d13ef58288113049885eee93024fb43a733 /svx/source/tbxctrls | |
parent | 6d9691892b192f7fcecc0a938e929fc40ec208d8 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
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()); } |