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 e005690e9c
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.klos@collabora.com>
This commit is contained in:
Szymon Kłos 2024-11-27 16:25:54 +01:00
parent 678f732d9c
commit 70d054a3da

View file

@ -443,6 +443,13 @@ public:
virtual Reference< css::accessibility::XAccessible > CreateAccessible() override; 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 virtual void set_sensitive(bool bSensitive) override
{ {
m_xWidget->set_sensitive(bSensitive); m_xWidget->set_sensitive(bSensitive);