QTfrontend/selectWeapon.cpp
changeset 1456 2539dd079be1
parent 1455 7d0a4ecd8210
child 1509 34f7dd4efe84
equal deleted inserted replaced
1455:7d0a4ecd8210 1456:2539dd079be1
    73   m_numItems(numItems),
    73   m_numItems(numItems),
    74   QFrame(parent)
    74   QFrame(parent)
    75 {
    75 {
    76   wconf = new QSettings(cfgdir->absolutePath() + "/weapons.ini", QSettings::IniFormat, this);
    76   wconf = new QSettings(cfgdir->absolutePath() + "/weapons.ini", QSettings::IniFormat, this);
    77 
    77 
    78   if(wconf->value("Default", "").toString().size() != cDefaultAmmoStore->size() - 10)
    78   wconf->setValue("Default", cDefaultAmmoStore->mid(10));
    79   {
       
    80     wconf->clear();
       
    81     wconf->setValue("Default", cDefaultAmmoStore->mid(10));
       
    82   }
       
    83 
    79 
    84   currentState=cDefaultAmmoStore->mid(10);
    80   currentState=cDefaultAmmoStore->mid(10);
    85 
    81 
    86   pLayout=new QGridLayout(this);
    82   pLayout=new QGridLayout(this);
    87   pLayout->setSpacing(1);
    83   pLayout->setSpacing(1);