equal
deleted
inserted
replaced
443 pMapContainer->setMazeSize(value.toUInt()); |
443 pMapContainer->setMazeSize(value.toUInt()); |
444 return; |
444 return; |
445 } |
445 } |
446 if (param == "SCRIPT") |
446 if (param == "SCRIPT") |
447 { |
447 { |
448 pMapContainer->setScript(value); |
|
449 Scripts->setCurrentIndex(Scripts->findText(value)); |
448 Scripts->setCurrentIndex(Scripts->findText(value)); |
|
449 pMapContainer->setScript(Scripts->itemData(Scripts->currentIndex(), GameStyleModel::ScriptRole).toString().toUtf8()); |
450 return; |
450 return; |
451 } |
451 } |
452 if (param == "DRAWNMAP") |
452 if (param == "DRAWNMAP") |
453 { |
453 { |
454 pMapContainer->setDrawnMapData(qUncompress(QByteArray::fromBase64(slValue[0].toLatin1()))); |
454 pMapContainer->setDrawnMapData(qUncompress(QByteArray::fromBase64(slValue[0].toLatin1()))); |
650 pMapContainer->setScript(QString("")); |
650 pMapContainer->setScript(QString("")); |
651 } |
651 } |
652 else |
652 else |
653 { |
653 { |
654 pMapContainer->setScript(name); |
654 pMapContainer->setScript(name); |
|
655 pMapContainer->setScript(Scripts->itemData(index, GameStyleModel::ScriptRole).toString().toUtf8()); |
655 } |
656 } |
656 emit paramChanged("SCRIPT", QStringList(name)); |
657 emit paramChanged("SCRIPT", QStringList(name)); |
657 } |
658 } |
658 |
659 |
659 void GameCFGWidget::mapgenChanged(MapGenerator m) |
660 void GameCFGWidget::mapgenChanged(MapGenerator m) |