From: Mikko Rasa Date: Mon, 28 Feb 2011 10:56:14 +0000 (+0000) Subject: Adjust some slider checks X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4f4a17099ee8e927b55fb80c7eaf18a0b4b595db;p=libs%2Fgltk.git Adjust some slider checks --- diff --git a/source/entry.cpp b/source/entry.cpp index 2dc0466..a554dbb 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -129,7 +129,7 @@ void Entry::render_special(const Part &part) const part.get_graphic(state)->render(part.get_geometry().w, part.get_geometry().h); GL::pop_matrix(); } - else if(part.get_name()=="slider") + else if(part.get_name()=="slider" && multiline) slider->render(); } @@ -263,12 +263,9 @@ void Entry::check_view_range() else if(row>=first_row+visible_rows) first_row = row+1-visible_rows; - if(slider) - { - unsigned scroll = max(text.get_n_lines(), visible_rows)-visible_rows; - slider->set_range(0, scroll); - slider->set_value(scroll-first_row); - } + unsigned scroll = max(text.get_n_lines(), visible_rows)-visible_rows; + slider->set_range(0, scroll); + slider->set_value(scroll-first_row); } void Entry::slider_value_changed(double value)