diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-10-06 16:59:52 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-10-27 23:00:22 +0100 |
commit | a4d4ed86991e2901ac86189e95966d4e99be4944 (patch) | |
tree | 2d7b9d05e93045fed474eac5afbb7f783b16fd63 /chart2/source | |
parent | 9e51d871a641b355925fd65e62fe969b6c25e5c3 (diff) |
Fire selection change event before sidebar is unregistered
Prevent us from crash in online using mobile phone
when leaving chart edit mode with chart type modified.
Change-Id: I8da70612786141a2c92b55a45822ef8ff5713e5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104606
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index df58f924189a..5e280c94b7c0 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -746,6 +746,9 @@ void SAL_CALL ChartController::dispose() { m_bDisposed = true; + mpSelectionChangeHandler->selectionChanged(css::lang::EventObject()); + mpSelectionChangeHandler->Disconnect(); + if (getModel().is()) { uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getModel()); @@ -754,8 +757,6 @@ void SAL_CALL ChartController::dispose() sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this); } } - mpSelectionChangeHandler->selectionChanged(css::lang::EventObject()); - mpSelectionChangeHandler->Disconnect(); try { |