- Timestamp:
- Mar 16, 2011, 1:02:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tspmodel.cpp
r151 r155 326 326 return false; 327 327 if (role == Qt::EditRole && index.row() != index.column()) { 328 if (value.toString().compare(INFSTR) == 0) 328 if ((value.toString().compare(INFSTR) == 0) 329 || (value.toString().contains(QRegExp("^[^0-9]+$", Qt::CaseInsensitive)))) { 329 330 table[index.row()][index.column()] = INFINITY; 330 else {331 } else { 331 332 bool ok; 332 333 double tmp = value.toDouble(&ok);
Note: See TracChangeset
for help on using the changeset viewer.