diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-11 15:18:20 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2022-05-12 12:37:04 +0200 |
commit | 1301b26b28b3d85bb6f5cd1dad53da1580f873ff (patch) | |
tree | d4b8b2310bef83804c5468e93cb2e61129239ee7 | |
parent | f2bf1cc2a9a4a09ec16900e91949e1669963c392 (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/+/134175
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-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 02fb3d540ba8..a88ececfa7dd 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -71,7 +71,6 @@ namespace { class ImplGrafControl final : public InterimItemWindow { private: - Idle maIdle; OUString maCommand; Reference<XFrame> mxFrame; std::unique_ptr<weld::Image> mxImage; @@ -79,7 +78,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 ); @@ -100,10 +99,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); @@ -196,7 +195,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")) @@ -232,8 +230,6 @@ ImplGrafControl::ImplGrafControl( mxField->set_increments(1, 10, FieldUnit::PERCENT); } - maIdle.SetInvokeHandler( LINK( this, ImplGrafControl, ImplModifyHdl ) ); - SetSizePixel(m_xContainer->get_preferred_size()); } |