Chart: Make Data Range Dialog Async

To reproduce the step, double-click on the chart and right-click to open the context menu, where you can see the option for data ranges.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I0697d5918d35d132aa7c17f86204742017f7ff17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163358
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit afbb4e44478e520b866032df8f0a0a344568233e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163402
Tested-by: Jenkins
This commit is contained in:
codewithvk
2024-02-14 15:15:37 +05:30
committed by Tomaž Vajngerl
parent 88ba9fab08
commit 4965b055b5

View File

@@ -1393,17 +1393,17 @@ void ChartController::executeDispatch_SourceData()
rModel.attachDataProvider(xDataProvider);
}
}
UndoLiveUpdateGuard aUndoGuard(
SchResId(STR_ACTION_EDIT_DATA_RANGES), m_xUndoManager);
auto aUndoGuard = std::make_shared<UndoLiveUpdateGuard>(SchResId(STR_ACTION_EDIT_DATA_RANGES),
m_xUndoManager);
SolarMutexGuard aSolarGuard;
::chart::DataSourceDialog aDlg(GetChartFrame(), xChartDoc);
if (aDlg.run() == RET_OK)
{
impl_adaptDataSeriesAutoResize();
aUndoGuard.commit();
}
auto aDlg = std::make_shared<DataSourceDialog>(GetChartFrame(), xChartDoc);
weld::DialogController::runAsync(aDlg, [this, aUndoGuard](int nResult) {
if (nResult == RET_OK)
{
impl_adaptDataSeriesAutoResize();
aUndoGuard->commit();
}
});
}
void ChartController::executeDispatch_MoveSeries( bool bForward )