From 1ee9eeb5789102ec2e084633556d1ad8bc2a2ce5 Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 21 Dec 2007 18:10:58 +0000 Subject: [PATCH] next time, save before you commit... git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@776 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/gui/control/tree_list.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/gui/control/tree_list.cpp b/src/gui/control/tree_list.cpp index 45b5a218..acb3bd67 100644 --- a/src/gui/control/tree_list.cpp +++ b/src/gui/control/tree_list.cpp @@ -263,30 +263,13 @@ void TreeList::onLeftDClick(wxMouseEvent& ev) { // ----------------------------------------------------------------------------- : TreeList : Copy of VScrolledWindow void TreeList::ScrollToLine(size_t line) { - // Based on VScrolledWindow::ScrollToLine - // determine the real first line to scroll to: we shouldn't scroll beyond the end line = (size_t)min((int)line, (int)(total_lines - visible_lines_t)); - - // nothing to do? + // nothing to do? if (line == first_line) return; - - //%size_t first_line_old = first_line; first_line = line; - UpdateScrollbar(); - - Refresh(false); - /* - // finally refresh the display -- but only redraw as few lines as possible to avoid flicker - wxSize cs = GetClientSize(); - int dy = (int)(first_line_old - first_line) * item_height; - if (abs(dy) >= cs.y - header_height) { - Refresh(false); - } else { - wxRect rect(0, header_height, cs.x, cs.y - header_height); - ScrollWindow(0, dy, &rect); - }*/ + Refresh(false); } void TreeList::UpdateScrollbar() {