diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index cb3ee0527127..8c0c83f4713a 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1182,8 +1182,7 @@ bool DataBrowser::SaveModified() bool DataBrowser::EndEditing() { - if( IsModified()) - SaveModified(); + SaveModified(); // apply changes made to series headers ::std::for_each( m_aSeriesHeaders.begin(), m_aSeriesHeaders.end(), impl::applyChangesFunctor()); diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index c87f1678318a..726ba03266fc 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -57,8 +57,8 @@ void ChartController::executeDispatch_EditData() SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ), m_xUndoManager ); DataEditor aDataEditorDialog( pParent, xChartDoc, m_xCC ); - // the dialog has no OK/Cancel - aDataEditorDialog.Execute(); + if (aDataEditorDialog.Execute() == RET_OK) + aDataEditorDialog.ApplyChangesToModel(); aUndoGuard.commit(); } }