[rkward-cvs] SF.net SVN: rkward: [1920] trunk/rkward/rkward/core/rkvariable.cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed May 23 11:11:08 UTC 2007
Revision: 1920
http://svn.sourceforge.net/rkward/?rev=1920&view=rev
Author: tfry
Date: 2007-05-23 04:11:08 -0700 (Wed, 23 May 2007)
Log Message:
-----------
When replacing a value, clear the Invalid flag.
Modified Paths:
--------------
trunk/rkward/rkward/core/rkvariable.cpp
Modified: trunk/rkward/rkward/core/rkvariable.cpp
===================================================================
--- trunk/rkward/rkward/core/rkvariable.cpp 2007-05-23 08:51:04 UTC (rev 1919)
+++ trunk/rkward/rkward/core/rkvariable.cpp 2007-05-23 11:11:08 UTC (rev 1920)
@@ -509,8 +509,9 @@
RK_TRACE (OBJECTS);
RK_ASSERT (row < getLength ());
+ // clear previous state
if (myData ()->cell_states[row] & RKVarEditData::Invalid) {
- myData ()->cell_states[row] = RKVarEditData::Invalid | RKVarEditData::UnsyncedInvalidState;
+ myData ()->cell_states[row] = RKVarEditData::UnsyncedInvalidState;
myData ()->invalid_fields.remove (row);
} else {
myData ()->cell_states[row] = 0;
@@ -589,7 +590,7 @@
} else if (getDataType () == DataFactor) {
int i = 0;
for (int row=from_row; row <= to_row; ++row) {
- if (myData ()->cell_states[row] & RKVarEditData::Invalid) myData ()->cell_states[row] = RKVarEditData::Invalid | RKVarEditData::UnsyncedInvalidState;
+ if (myData ()->cell_states[row] & RKVarEditData::Invalid) myData ()->cell_states[row] = RKVarEditData::UnsyncedInvalidState;
else myData ()->cell_states[row] = 0;
if (isnan (data[i]) || (!myData ()->value_labels) || (!myData ()->value_labels->contains (QString::number (data[i])))) {
@@ -603,7 +604,7 @@
} else {
int i = 0;
for (int row=from_row; row <= to_row; ++row) {
- if (myData ()->cell_states[row] & RKVarEditData::Invalid) myData ()->cell_states[row] = RKVarEditData::Invalid | RKVarEditData::UnsyncedInvalidState;
+ if (myData ()->cell_states[row] & RKVarEditData::Invalid) myData ()->cell_states[row] = RKVarEditData::UnsyncedInvalidState;
else myData ()->cell_states[row] = 0;
if (isnan (data[i])) {
@@ -644,7 +645,7 @@
if (getDataType () == DataCharacter) {
int i=0;
for (int row=from_row; row <= to_row; ++row) {
- if (myData ()->cell_states[row] & RKVarEditData::Invalid) myData ()->cell_states[row] = RKVarEditData::Invalid | RKVarEditData::UnsyncedInvalidState;
+ if (myData ()->cell_states[row] & RKVarEditData::Invalid) myData ()->cell_states[row] = RKVarEditData::UnsyncedInvalidState;
else myData ()->cell_states[row] = 0;
if (data[i].isNull ()) myData ()->cell_states[row] |= RKVarEditData::NA;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list