summaryrefslogtreecommitdiff
path: root/src/gui/widgets/characterviewnormal.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-17 21:16:13 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-17 21:17:12 +0300
commit1e80a56b8444373997f3f7458bf0547c298c7abd (patch)
treed6007f8e1570ce82935d101e3658cbcee5e52084 /src/gui/widgets/characterviewnormal.cpp
parent2d78c7477a7289f63a9709a616c2f49e4b795fa5 (diff)
downloadmv-1e80a56b8444373997f3f7458bf0547c298c7abd.tar.gz
mv-1e80a56b8444373997f3f7458bf0547c298c7abd.tar.bz2
mv-1e80a56b8444373997f3f7458bf0547c298c7abd.tar.xz
mv-1e80a56b8444373997f3f7458bf0547c298c7abd.zip
dont call virtual functions in characterview constructor.
Diffstat (limited to 'src/gui/widgets/characterviewnormal.cpp')
-rw-r--r--src/gui/widgets/characterviewnormal.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp
index 7e6fe380d..b24828fcc 100644
--- a/src/gui/widgets/characterviewnormal.cpp
+++ b/src/gui/widgets/characterviewnormal.cpp
@@ -44,7 +44,11 @@ CharacterViewNormal::CharacterViewNormal(CharSelectDialog *const widget,
add(character);
character->setVisible(true);
}
- show(0);
+ if (mSelected >= 0)
+ (*mCharacterEntries)[mSelected]->setSelect(false);
+ mSelected = 0;
+ (*mCharacterEntries)[0]->setSelect(true);
+
const CharacterDisplay *const firtChar = (*mCharacterEntries)[0];
setWidth(firtChar->getWidth() * 5 + mPadding * 2);
}