svx/source/tbxctrls/tbcontrl.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 70d054a3da47362adf81442c399bc5bd3cfe43c3
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Nov 27 16:25:54 2024 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Fri Nov 29 06:47:19 2024 +0100

    lok: jsdialog: enable font name box after save
    
    When we save - we block UI. In the lok we disable that for
    some cases like in commit e005690e9c648ce516c1ed60da6341c7215bf2c9
    lok: avoid sending jsdialog messages during background save.
    
    But we also use save file to generate previews of shapes what happens
    on eg. resize in Online. Then we trigger disable and enable cycle
    for frames - and we end with FontNameBox enabled!
    
    That was causing the JSDialog combobox still being locked - because
    frame unlock was using direct VCL API, not weld:: one in the
    InterimItemWindow. Let's fix that with proper StateChanged handling.
    
    So now it is functional. But still I think there is some error in the
    logic - as after save we should beg the "before save" state of control
    not "always enabled". But it's different problem.
    
    Change-Id: Ia8e5c8c864156271b5f68d482234e83eb57b0deb
    (cherry picked from commit cbe229ec219e56ce1bb5dd9598f9052a98504249)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177489
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index b554aff1993c..056821829c32 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -443,6 +443,13 @@ public:
 
     virtual Reference< css::accessibility::XAccessible > CreateAccessible() 
override;
 
+    virtual void StateChanged(StateChangedType nStateChange) override
+    {
+        if (nStateChange == StateChangedType::Enable)
+            m_xWidget->set_sensitive(IsEnabled());
+        InterimItemWindow::StateChanged(nStateChange);
+    }
+
     virtual void set_sensitive(bool bSensitive) override
     {
         m_xWidget->set_sensitive(bSensitive);

Reply via email to