diff options
author | chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-14 16:00:32 +0000 |
---|---|---|
committer | chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-14 16:00:32 +0000 |
commit | 686e68019374dca3692cac6d5f8d94515e53d6c8 (patch) | |
tree | c909c15eade57e24184ea01b2fa70242cee81b03 | |
parent | 7ca24437c71af06fc06ab5f6f261b185882fa440 (diff) |
Bug Fix: Resets the users zoom and translation every picture load. Was acting inconsistently between different viewing widgets, now forces a redraw every new picture.
Review URL: https://codereview.appspot.com/6450130
git-svn-id: http://skia.googlecode.com/svn/trunk@5083 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | debugger/QT/SkCanvasWidget.h | 4 | ||||
-rw-r--r-- | debugger/QT/SkDebuggerGUI.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/debugger/QT/SkCanvasWidget.h b/debugger/QT/SkCanvasWidget.h index ff72c60066..ab634f8f04 100644 --- a/debugger/QT/SkCanvasWidget.h +++ b/debugger/QT/SkCanvasWidget.h @@ -36,6 +36,8 @@ public: void zoom(float zoomIncrement); + void resetWidgetTransform(); + signals: void scaleFactorChanged(float newScaleFactor); void commandChanged(int newCommand); @@ -55,8 +57,6 @@ private: SkIPoint fUserOffset; float fUserScaleFactor; - void resetWidgetTransform(); - void mouseMoveEvent(QMouseEvent* event); void mousePressEvent(QMouseEvent* event); diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp index a311916dba..6075df0430 100644 --- a/debugger/QT/SkDebuggerGUI.cpp +++ b/debugger/QT/SkDebuggerGUI.cpp @@ -575,7 +575,9 @@ void SkDebuggerGUI::loadPicture(QString fileName) { fLoading = true; SkStream* stream = new SkFILEStream(fileName.toAscii()); SkPicture* picture = new SkPicture(stream); + fCanvasWidget.resetWidgetTransform(); fDebugger.loadPicture(picture); + fCanvasWidget.drawTo(fDebugger.index()); SkSafeUnref(stream); SkSafeUnref(picture); |