diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-17 22:35:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-19 15:12:18 +0300 |
commit | ed22f9496d56bdfd5f4d13d292326111e79263e4 (patch) | |
tree | 13ab556bccc2073e4add70cb19913c0ee959aaad /src/gui | |
parent | a3db00d09e414b7fdaac39afc3dc623fdf564c31 (diff) | |
download | manaplus-ed22f9496d56bdfd5f4d13d292326111e79263e4.tar.gz manaplus-ed22f9496d56bdfd5f4d13d292326111e79263e4.tar.bz2 manaplus-ed22f9496d56bdfd5f4d13d292326111e79263e4.tar.xz manaplus-ed22f9496d56bdfd5f4d13d292326111e79263e4.zip |
dont call virtual function in constructor in colorpage.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/colorpage.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp index fce2227aa..617084917 100644 --- a/src/gui/widgets/colorpage.cpp +++ b/src/gui/widgets/colorpage.cpp @@ -33,11 +33,14 @@ ColorPage::ColorPage(const Widget2 *const widget, mItemPadding(mSkin ? mSkin->getOption("itemPadding") : 1), mRowHeight(13) { -// addMouseListener(this); const gcn::Font *const font = getFont(); if (font) mRowHeight = font->getHeight() + 2 * mItemPadding; - adjustSize(); + if (mListModel) + { + setHeight(getRowHeight() * mListModel->getNumberOfElements() + + 2 * mPadding + 20); + } } ColorPage::~ColorPage() |