From a4790d7a523cc7c4eecb1fab2ba0fe9da18a9042 Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Wed, 28 Sep 2011 18:42:10 -0700 Subject: [PATCH] Cherrypick 09aefc from master. do not merge. Check for scrolling before refreshing the table. Change-Id: I14e596a79120284b0c1b8e4bc23439b10a37c2ff --- ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java index 58913b65a..4c883eb5b 100644 --- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java +++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java @@ -864,9 +864,12 @@ public final class LogCatPanel extends SelectionDependentPanel synchronized (LogCatPanel.this) { mCurrentRefresher = null; } + + // find out if we need to scroll before refreshing the table + boolean shouldScroll = shouldScrollToLatestLog(); mViewer.refresh(); - if (shouldScrollToLatestLog()) { + if (shouldScroll) { scrollToLatestLog(); } } -- 2.11.0