diff data/model/SparseTimeValueModel.h @ 421:397fe91dc8e0

* Fix for data modification in data edit view... now why isn't the command appearing on the undo menu?
author Chris Cannam
date Wed, 11 Jun 2008 17:00:04 +0000
parents 50a956688baa
children 4caa28a0a8a2
line wrap: on
line diff
--- a/data/model/SparseTimeValueModel.h	Wed Jun 11 16:13:25 2008 +0000
+++ b/data/model/SparseTimeValueModel.h	Wed Jun 11 17:00:04 2008 +0000
@@ -138,11 +138,16 @@
         }
     }
 
-    virtual Command *setData(int row, int column, QVariant value, int role) 
+    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role) const
     {
+        std::cerr << "SparseTimeValueModel::setData: row = " << row << ", column = " << column << ", role = " << role << std::endl;
+
         if (role != Qt::EditRole) return false;
         PointListIterator i = getPointListIteratorForRow(row);
-        if (i == m_points.end()) return false;
+        if (i == m_points.end()) {
+            std::cerr << "Failed to find point iterator for row " << row << std::endl;
+            return false;
+        }
         EditCommand *command = new EditCommand(this, tr("Edit Data"));
 
         Point point(*i);