From: Mikko Rasa Date: Mon, 28 Apr 2008 13:51:58 +0000 (+0000) Subject: Add Table widget X-Git-Tag: 0.9~9 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f34c8d617cbe8ae426e7a1e280dfa0aaf5d11a6d;p=libs%2Fgltk.git Add Table widget Bugfixes in List --- diff --git a/source/list.cpp b/source/list.cpp index 722e296..8c0d789 100644 --- a/source/list.cpp +++ b/source/list.cpp @@ -71,6 +71,8 @@ void List::clear() { items.clear(); sel_index=-1; + + recalculate_parameters(); } void List::set_selected_index(int i) @@ -261,7 +263,8 @@ void List::recalculate_parameters() void List::slider_value_changed(double value) { - first=items.size()-n_visible-static_cast(value); + if(items.size()>n_visible) + first=items.size()-n_visible-static_cast(value); } diff --git a/source/panel.cpp b/source/panel.cpp index f17439a..4d0d5d1 100644 --- a/source/panel.cpp +++ b/source/panel.cpp @@ -15,6 +15,7 @@ Distributed under the LGPL #include "list.h" #include "panel.h" #include "part.h" +#include "table.h" #include "toggle.h" #include "vslider.h" @@ -233,6 +234,7 @@ Panel::Loader::Loader(Panel &p, map &m): add("label", &Loader::child