[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [labplot] src/backend/core/column: Update columns statistics on value changes in the spreadsheet.
From: Alexander Semke <alexander.semke () web ! de>
Date: 2016-04-30 21:23:51
Message-ID: E1awcMh-0004or-ON () scm ! kde ! org
[Download RAW message or body]
Git commit 037eff28238ce5a57e364945fd21825e932f8402 by Alexander Semke.
Committed on 30/04/2016 at 20:22.
Pushed by asemke into branch 'master'.
Update columns statistics on value changes in the spreadsheet.
M +9 -8 src/backend/core/column/Column.cpp
http://commits.kde.org/labplot/037eff28238ce5a57e364945fd21825e932f8402
diff --git a/src/backend/core/column/Column.cpp b/src/backend/core/column/Column.cpp
index c26efd8..2c1ec58 100644
--- a/src/backend/core/column/Column.cpp
+++ b/src/backend/core/column/Column.cpp
@@ -329,8 +329,8 @@ void Column::clearFormulas()
*
* Use this only when columnMode() is Text
*/
-void Column::setTextAt(int row, const QString& new_value)
-{
+void Column::setTextAt(int row, const QString& new_value) {
+ setStatisticsAvailable(false);
exec(new ColumnSetTextCmd(m_column_private, row, new_value));
}
@@ -339,10 +339,11 @@ void Column::setTextAt(int row, const QString& new_value)
*
* Use this only when columnMode() is Text
*/
-void Column::replaceTexts(int first, const QStringList& new_values)
-{
- if (!new_values.isEmpty())
+void Column::replaceTexts(int first, const QStringList& new_values) {
+ if (!new_values.isEmpty()) { //TODO: do we really need this check?
+ setStatisticsAvailable(false);
exec(new ColumnReplaceTextsCmd(m_column_private, first, new_values));
+ }
}
/**
@@ -350,9 +351,8 @@ void Column::replaceTexts(int first, const QStringList& new_values)
*
* Use this only when columnMode() is DateTime, Month or Day
*/
-void Column::setDateAt(int row, const QDate& new_value)
-{
- setStatisticsAvailable(false);
+void Column::setDateAt(int row, const QDate& new_value) {
+ setStatisticsAvailable(false);
setDateTimeAt(row, QDateTime(new_value, timeAt(row)));
}
@@ -1080,6 +1080,7 @@ void ColumnStringIO::setTextAt(int row, const QString &value)
m_owner->copy(m_owner->m_column_private->inputFilter()->output(0), 0, row, 1);
m_setting = false;
m_to_set.clear();
+ m_owner->setStatisticsAvailable(false);
}
QString ColumnStringIO::textAt(int row) const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic