From ed22f9496d56bdfd5f4d13d292326111e79263e4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Oct 2013 22:35:30 +0300 Subject: dont call virtual function in constructor in colorpage. --- src/gui/widgets/colorpage.cpp | 7 +++++-- 1 file 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() -- cgit v1.2.3-70-g09d2