From b8bc24764ebec8a19e0a61f0e1f2b2843be22d70 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 28 Mar 2006 23:27:20 +0000 Subject: STR 1183: swapping two items in an Fl_Browser_ widget would corrupt redrawing if either item was "top". This fix swaps the top_ variable correctly, and also swaps the selection flag as the user would expect. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4879 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Browser.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Fl_Browser.cxx') diff --git a/src/Fl_Browser.cxx b/src/Fl_Browser.cxx index 96f2dfe05..03c43d82b 100644 --- a/src/Fl_Browser.cxx +++ b/src/Fl_Browser.cxx @@ -503,6 +503,7 @@ int Fl_Browser::value() const { void Fl_Browser::swap(FL_BLINE *a, FL_BLINE *b) { if ( a == b || !a || !b) return; // nothing to do + swapping(a, b); FL_BLINE *aprev = a->prev; FL_BLINE *anext = a->next; FL_BLINE *bprev = b->prev; @@ -535,8 +536,6 @@ void Fl_Browser::swap(FL_BLINE *a, FL_BLINE *b) { } // Disable cache -- we played around with positions cacheline = 0; - // Redraw modified lines - redraw_lines(); } void Fl_Browser::swap(int ai, int bi) { -- cgit v1.2.3