Changeset 47c811cc09 in tspsg for src/mainwindow.cpp


Ignore:
Timestamp:
Oct 13, 2012, 9:02:50 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
b96b44b6b7
Parents:
07e43cf61a
Message:

Added a way to change maximum number of cities without recompiling.

Added Tweaks/MaxNumCitites? setting to tspsg.ini. The maximum number of
cities limit can be controlled by setting it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    r07e43cf61a r47c811cc09  
    129129{
    130130    settings = initSettings(this);
     131
     132    // Sanity check
     133    int m = settings->value("Tweaks/MaxNumCities", MAX_NUM_CITIES).toInt();
     134    if (m < 3)
     135        settings->setValue("Tweaks/MaxNumCities", 3);
    131136
    132137    if (settings->contains("Style")) {
     
    19661971        actionHelpCheck4Updates = NULL;
    19671972
    1968     spinCities->setMaximum(MAX_NUM_CITIES);
     1973    spinCities->setMaximum(settings->value("Tweaks/MaxNumCities", MAX_NUM_CITIES).toInt());
    19691974
    19701975#ifndef HANDHELD
Note: See TracChangeset for help on using the changeset viewer.