Changeset 47c811cc09 in tspsg for src/tspmodel.cpp
- Timestamp:
- Oct 13, 2012, 9:02:50 PM (12 years ago)
- Branches:
- appveyor, imgbot, master, readme
- Children:
- b96b44b6b7
- Parents:
- 07e43cf61a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tspmodel.cpp
r07e43cf61a r47c811cc09 432 432 return false; 433 433 } 434 if (size > MAX_NUM_CITIES) { 435 QApplication::restoreOverrideCursor(); 436 QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor)); 437 QMessageBox::critical(QApplication::activeWindow(), tr("Task Load"), tr("Unable to load task:") + "\n" 438 + tr("The task contains more cities (%1) than this version of %3 supports (%2).\n" 439 "You might be using an old version of the application or the file could be corrupted.") 440 .arg(size).arg(MAX_NUM_CITIES).arg(QApplication::applicationName())); 434 if (size > settings->value("Tweaks/MaxNumCities", MAX_NUM_CITIES).toInt()) { 435 QApplication::restoreOverrideCursor(); 436 QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor)); 437 if (settings->contains("Tweaks/MaxNumCities")) { 438 QMessageBox::critical( 439 QApplication::activeWindow(), tr("Task Load"), tr("Unable to load task:") + "\n" 440 + tr("Your Tweaks/MaxNumCities setting in tspsg.ini is currently set to %1" 441 " but the task you're trying to load contains %2 cities.\n" 442 "Please, set Tweaks/MaxNumCities setting to at least %2" 443 " to be able to load this task.") 444 .arg(settings->value("Tweaks/MaxNumCities").toInt()).arg(size)); 445 } else { 446 QMessageBox::critical( 447 QApplication::activeWindow(), tr("Task Load"), tr("Unable to load task:") + "\n" 448 + tr("The maximum number of cities this version of %1 supports is %2" 449 " but the task you're trying to load contains %3.\n" 450 "You might be using an old version of the application or the file" 451 " could be corrupted.") 452 .arg(QApplication::applicationName()).arg(MAX_NUM_CITIES).arg(size)); 453 } 441 454 QApplication::restoreOverrideCursor(); 442 455 return false;
Note: See TracChangeset
for help on using the changeset viewer.