Changeset 5631fb4d50 in tspsg for src


Ignore:
Timestamp:
Mar 16, 2011, 1:02:49 AM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
d8a3826f87
Parents:
5cbcd091ed
git-author:
Oleksii Serdiuk <contacts@…> (03/16/11 01:02:49)
git-committer:
Oleksii Serdiuk <contacts@…> (06/29/12 19:45:58)
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
  • src/tspmodel.cpp

    r5cbcd091ed r5631fb4d50  
    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.