mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-11 11:31:52 +02:00
Merge pull request #4753 from IvanSavenko/misc_fixes
Fixes for regressions from recent PR's
This commit is contained in:
commit
e0e01d678a
@ -219,7 +219,12 @@ void PlayerLocalState::removeWanderingHero(const CGHeroInstance * hero)
|
||||
if (hero == currentSelection)
|
||||
{
|
||||
auto const * nextHero = getNextWanderingHero(hero);
|
||||
setSelection(nextHero);
|
||||
if (nextHero)
|
||||
setSelection(nextHero);
|
||||
else if (!ownedTowns.empty())
|
||||
setSelection(ownedTowns.front());
|
||||
else
|
||||
setSelection(nullptr);
|
||||
}
|
||||
|
||||
vstd::erase(wanderingHeroes, hero);
|
||||
@ -334,7 +339,8 @@ void PlayerLocalState::serialize(JsonNode & dest) const
|
||||
dest["spellbook"]["tabBattle"].Integer() = spellbookSettings.spellbookLastTabBattle;
|
||||
dest["spellbook"]["tabAdvmap"].Integer() = spellbookSettings.spellbookLastTabAdvmap;
|
||||
|
||||
dest["currentSelection"].Integer() = currentSelection->id;
|
||||
if (currentSelection)
|
||||
dest["currentSelection"].Integer() = currentSelection->id;
|
||||
}
|
||||
|
||||
void PlayerLocalState::deserialize(const JsonNode & source)
|
||||
|
@ -47,7 +47,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-126</y>
|
||||
<y>-797</y>
|
||||
<width>729</width>
|
||||
<height>1503</height>
|
||||
</rect>
|
||||
@ -261,31 +261,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="60" column="4">
|
||||
<widget class="QToolButton" name="buttonValidationBasic">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroupValidation</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="31" column="0">
|
||||
<widget class="QLabel" name="labelSoundVolume">
|
||||
<property name="text">
|
||||
@ -1449,6 +1424,31 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use
|
||||
<item row="12" column="1" colspan="5">
|
||||
<widget class="QComboBox" name="comboBoxResolution"/>
|
||||
</item>
|
||||
<item row="60" column="3" colspan="2">
|
||||
<widget class="QToolButton" name="buttonValidationBasic">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Basic</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroupValidation</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -241,6 +241,7 @@ JsonNode JsonUtils::assembleFromFiles(const JsonNode & files, bool & isValid)
|
||||
}
|
||||
else
|
||||
{
|
||||
isValid = true;
|
||||
return files;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user