_fieldValues[fieldIndex] = inValue;
// Increment edit count on all field edits except segment
if (inField != Field.NEW_SEGMENT) {
- if (!inUndo) {
- _modifyCount++;
- }
- else {
- _modifyCount--;
- }
+ setModified(inUndo);
}
// Change Coordinate, Altitude, Name or Timestamp fields after edit
if (_altitude != null && _altitude.getFormat() != Altitude.Format.NO_FORMAT) {
}
}
+ /**
+ * Either increment or decrement the modify count, depending on whether it's an undo or not
+ * @param inUndo true for undo, false otherwise
+ */
+ public void setModified(boolean inUndo)
+ {
+ if (!inUndo) {
+ _modifyCount++;
+ }
+ else {
+ _modifyCount--;
+ }
+ }
+
/**
* @return field list for this point
*/