From 5be1c81913624b62add3db442c7b20fb152f866d Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 15 Jul 2017 14:03:36 +0400 Subject: [PATCH] Fixed Close button handler in EditEffectDialog (fixes #3956) --- apps/openmw/mwgui/spellcreationdialog.cpp | 9 +++++++++ files/mygui/openmw_edit_effect.layout | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp index 7201e64c2..e22fc3c63 100644 --- a/apps/openmw/mwgui/spellcreationdialog.cpp +++ b/apps/openmw/mwgui/spellcreationdialog.cpp @@ -170,11 +170,20 @@ namespace MWGui mAreaSlider->setScrollPosition (effect.mArea); mDurationSlider->setScrollPosition (effect.mDuration-1); + if (mEffect.mRange == ESM::RT_Self) + mRangeButton->setCaptionWithReplacing ("#{sRangeSelf}"); + else if (mEffect.mRange == ESM::RT_Target) + mRangeButton->setCaptionWithReplacing ("#{sRangeTarget}"); + else if (mEffect.mRange == ESM::RT_Touch) + mRangeButton->setCaptionWithReplacing ("#{sRangeTouch}"); + onMagnitudeMinChanged (mMagnitudeMinSlider, effect.mMagnMin-1); onMagnitudeMaxChanged (mMagnitudeMinSlider, effect.mMagnMax-1); onAreaChanged (mAreaSlider, effect.mArea); onDurationChanged (mDurationSlider, effect.mDuration-1); eventEffectModified(mEffect); + + updateBoxes(); } void EditEffectDialog::setMagicEffect (const ESM::MagicEffect *effect) diff --git a/files/mygui/openmw_edit_effect.layout b/files/mygui/openmw_edit_effect.layout index 387c01231..376e87efa 100644 --- a/files/mygui/openmw_edit_effect.layout +++ b/files/mygui/openmw_edit_effect.layout @@ -1,7 +1,7 @@ - +