diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-01-24 15:46:50 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-01-25 16:38:29 +0100 |
commit | 333ad127b915e6d318df4eef4f30f9231b5f8a95 (patch) | |
tree | ebf80ef36e7654639118c57ca3fbbe51073e988b | |
parent | a6827c3787f3056444586979750f97d3e963f6f2 (diff) |
tdf#146571 Ignore focus changes after closing Manage changes dialog
Change-Id: Ib588310410a265acdd129a8e51adf56bb5973bd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128869
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128823
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | include/sfx2/basedlgs.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutDialog.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 7 |
3 files changed, 10 insertions, 2 deletions
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 2d32406e4de9..39b5df4115c2 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -48,7 +48,7 @@ public: // when the dialog has an associated SfxChildWin, typically for Modeless interaction virtual void ChildWinDispose() {} // called from the associated SfxChildWin dtor - virtual void Close() {} // called by the SfxChildWin when the dialog is closed + virtual void Close(); // called by the SfxChildWin when the dialog is closed virtual void EndDialog(); // called by the SfxChildWin to close the dialog }; diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 39357771105d..a496b9a6efb4 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -627,7 +627,8 @@ void ScPivotLayoutDialog::PushDataFieldNames(std::vector<ScDPName>& rDataFieldNa void ScPivotLayoutDialog::Close() { - DoClose( ScPivotLayoutWrapper::GetChildWindowId() ); + DoClose(ScPivotLayoutWrapper::GetChildWindowId()); + SfxDialogController::Close(); } IMPL_LINK_NOARG( ScPivotLayoutDialog, OKClicked, weld::Button&, void ) diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 1f10f73ce5e4..190fea086ba9 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -197,6 +197,7 @@ void SfxModelessDialogController::Close() m_pBindings->GetDispatcher_Impl()->ExecuteList( m_xImpl->pMgr->GetType(), SfxCallMode::RECORD|SfxCallMode::SYNCHRON, { &aValue } ); + SfxDialogController::Close(); } SfxDialogController::SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, @@ -210,6 +211,12 @@ SfxDialogController::SfxDialogController(weld::Widget* pParent, const OUString& m_xDialog->connect_container_focus_changed(LINK(this, SfxDialogController, FocusChangeHdl)); } +void SfxDialogController::Close() +{ + // tdf3146571 ignore focus changes after we've closed + m_xDialog->connect_container_focus_changed(Link<weld::Container&, void>()); +} + IMPL_STATIC_LINK_NOARG(SfxDialogController, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) { return SfxViewShell::Current(); |