summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-17 22:35:30 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:18 +0300
commited22f9496d56bdfd5f4d13d292326111e79263e4 (patch)
tree13ab556bccc2073e4add70cb19913c0ee959aaad /src/gui/widgets
parenta3db00d09e414b7fdaac39afc3dc623fdf564c31 (diff)
downloadplus-ed22f9496d56bdfd5f4d13d292326111e79263e4.tar.gz
plus-ed22f9496d56bdfd5f4d13d292326111e79263e4.tar.bz2
plus-ed22f9496d56bdfd5f4d13d292326111e79263e4.tar.xz
plus-ed22f9496d56bdfd5f4d13d292326111e79263e4.zip
dont call virtual function in constructor in colorpage.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/colorpage.cpp7
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()