Changeset 155 in tspsg-svn


Ignore:
Timestamp:
Mar 16, 2011, 1:02:49 AM (14 years ago)
Author:
laleppa
Message:

Any value that is entered into task table and doesn't contain numbers is now considered an infinity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tspmodel.cpp

    r151 r155  
    326326        return false;
    327327    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)))) {
    329330            table[index.row()][index.column()] = INFINITY;
    330         else {
     331        } else {
    331332bool ok;
    332333double tmp = value.toDouble(&ok);
Note: See TracChangeset for help on using the changeset viewer.