changeset 16351:d8babb249f65

scroll to bottom of history list directly * history-dockwidget.cc (history_dock_widget::update_history_callback): Delete static variable scroll_window. Call scrollToBottom if the list changes instead of delaying to the next callback.
author John W. Eaton <jwe@octave.org>
date Thu, 21 Mar 2013 02:31:09 -0400
parents d4b6ad43bc87
children b8a4f313e78e
files libgui/src/history-dockwidget.cc
diffstat 1 files changed, 0 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/history-dockwidget.cc	Thu Mar 21 02:28:48 2013 -0400
+++ b/libgui/src/history-dockwidget.cc	Thu Mar 21 02:31:09 2013 -0400
@@ -134,8 +134,6 @@
 void
 history_dock_widget::update_history_callback (void)
 {
-  static bool scroll_window = false;
-
   // Determine the client's (our) history length and the one of the server.
   int clientHistoryLength = _history_model->rowCount ();
   int serverHistoryLength = command_history::length ();
@@ -156,18 +154,6 @@
                       QString::fromUtf8 (entry.data (), entry.size ()));
         }
 
-      // FIXME -- does this behavior make sense?  Calling
-      // _history_list_view->scrollToBottom () here doesn't seem to
-      // have any effect.  Instead, we need to request that action
-      // and wait until the next event occurs in which no items
-      // are added to the history list.
-
-      scroll_window = true;
-    }
-  else if (scroll_window)
-    {
-      scroll_window = false;
-
       _history_list_view->scrollToBottom ();
     }
 }