Bug Fix: Delete redraws correctly when redraw command execution is paused
authorchudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 12 Jul 2012 14:38:49 +0000 (14:38 +0000)
committerchudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 12 Jul 2012 14:38:49 +0000 (14:38 +0000)
Review URL: https://codereview.appspot.com/6392053

git-svn-id: http://skia.googlecode.com/svn/trunk@4567 2bbb7eff-a529-9590-31e7-b0007b416f81

debugger/QT/SkDebuggerGUI.cpp
debugger/QT/SkDebuggerGUI.h

index 12c3bdc..1cca0ba 100644 (file)
@@ -128,7 +128,7 @@ void SkDebuggerGUI::actionDelete() {
     int currentRow = fListWidget.currentRow();
     // NOTE(chudy): Forces a redraw up to current selected command.
     fCanvasWidget.toggleCommand(currentRow);
-    fCanvasWidget.drawTo(currentRow);
+    fCanvasWidget.drawTo(fPausedRow);
 }
 
 void SkDebuggerGUI::actionInspector() {
@@ -222,6 +222,7 @@ void SkDebuggerGUI::pauseDrawing(bool isPaused) {
     // Qt uses 0 for unchecked, 1 for partially enabled and 2 for checked.
     if (isPaused) {
         fPause = true;
+        fPausedRow = fListWidget.currentRow();
     } else {
         fPause = false;
         fCanvasWidget.drawTo(fListWidget.currentRow());
index e1c9bba..11eb856 100644 (file)
@@ -200,6 +200,7 @@ private:
 
     bool fBreakpointsActivated;
     bool fPause;
+    int fPausedRow;
 
     /**
         Creates the entire UI.