[Libreoffice-commits] core.git: chart2/source
Kohei Yoshida
kohei.yoshida at collabora.com
Fri Jun 27 08:35:14 PDT 2014
chart2/source/controller/dialogs/DataBrowser.cxx | 3 +--
chart2/source/controller/main/ChartController_EditData.cxx | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 483a4b546c850e82a2d1d304238d4830ac6b441f
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Jun 27 11:31:06 2014 -0400
Flush modified data to the model when pressing OK in the data table dialog.
This dialog used to have no OK / Cancel buttons, and the data would get
flushed when the dialog got dismissed. This behavior got lost during the
dialog conversion.
Also, SaveModified() does check whether or not the data table is modified.
No need to call IsModified() before calling SaveModified().
Change-Id: I5cea88cb52127cc5c7c1be67a5a592d87df92d0c
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index cb3ee05..8c0c83f 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 c87f167..726ba03 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();
}
}
More information about the Libreoffice-commits
mailing list