aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets/list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widgets/list.cpp')
-rw-r--r--gui/widgets/list.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 3ef365ba5c..9144282e65 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -36,10 +36,7 @@ namespace GUI {
ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, uint32 cmd)
: EditableWidget(boss, name, tooltip), _cmd(cmd) {
- _scrollBar = NULL;
-
- // This ensures that _entriesPerPage is properly initialized.
- reflowLayout();
+ _entriesPerPage = 0;
_scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth, 0, _scrollBarWidth, _h);
_scrollBar->setTarget(this);
@@ -69,10 +66,7 @@ ListWidget::ListWidget(Dialog *boss, const String &name, const char *tooltip, ui
ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd)
: EditableWidget(boss, x, y, w, h, tooltip), _cmd(cmd) {
- _scrollBar = NULL;
-
- // This ensures that _entriesPerPage is properly initialized.
- reflowLayout();
+ _entriesPerPage = 0;
_scrollBar = new ScrollBarWidget(this, _w - _scrollBarWidth, 0, _scrollBarWidth, _h);
_scrollBar->setTarget(this);