QTfrontend/model/ammoSchemeModel.cpp
branch0.9.21
changeset 10733 b22c57f45e86
parent 10729 28d5cebdf660
child 10822 def423815f24
equal deleted inserted replaced
10731:bc359abe0484 10733:b22c57f45e86
   843         return QVariant();
   843         return QVariant();
   844 
   844 
   845     return netScheme[index.column()];
   845     return netScheme[index.column()];
   846 }
   846 }
   847 
   847 
   848 void NetAmmoSchemeModel::setNetSchemeConfig(QStringList & cfg)
   848 void NetAmmoSchemeModel::setNetSchemeConfig(QStringList cfg)
   849 {
   849 {
   850     if(cfg.size() != netScheme.size())
   850     if(cfg.size() != netScheme.size())
   851     {
   851     {
   852         qWarning("Incorrect scheme cfg size");
   852         qWarning("Incorrect scheme cfg size");
   853         return;
   853         return;
   854     }
   854     }
   855     
   855 
   856     if (cfg[42].at(0)=='!')
   856     cfg[42] = cfg[42].mid(1);
   857         cfg[42] = cfg[42].mid(1);
       
   858     else
       
   859         qDebug() <<  "Script param didn't start with !: " << cfg[42];
       
   860 
   857 
   861     for(int i = 0; i < cfg.size(); ++i)
   858     for(int i = 0; i < cfg.size(); ++i)
   862         netScheme[i] = QVariant(cfg[i]);
   859         netScheme[i] = QVariant(cfg[i]);
   863 
   860 
   864     reset();
   861     reset();