From fb6bcbfc31da3cdef6f6950e3e6aec900909b02e Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 19 Aug 2010 17:10:21 +0000 Subject: Behave just a little bit nicer... --- client/widgets/multilist.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/widgets/multilist.cc b/client/widgets/multilist.cc index 8cd60b7..b913208 100644 --- a/client/widgets/multilist.cc +++ b/client/widgets/multilist.cc @@ -129,6 +129,9 @@ void MultiList::changed() bool MultiList::preValid() { + return list->count() != 0; + + /* if(innerwidget_has_changes) { switch(MessageBox::warning(NULL, "Gem ændringerne i listen?", @@ -151,8 +154,8 @@ bool MultiList::preValid() break; } } - return true; + */ } QString MultiList::value() @@ -208,7 +211,7 @@ void MultiList::add() list->addItem(innerwidget->value()); emit wasChanged(); - innerwidget->setValues(); + innerwidget->setValues(); // Hack to reset widgets to their initial values. innerwidget_has_changes = false; emit eventOnChange(); @@ -242,5 +245,5 @@ void MultiList::setWdgValid(bool valid) palette.setBrush(QPalette::Base, QBrush(QColor(230, 200, 200))); } - frame->setPalette(palette); + list->setPalette(palette); } -- cgit v1.2.3