From cda73d09604910677452c4b2ddcaf4e493ed3c27 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 20 Apr 2010 21:39:58 +0200 Subject: [PATCH] editor: update scrollbars after loading --- editor/editor.cpp | 3 ++- editor/trackview.h | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/editor/editor.cpp b/editor/editor.cpp index c6b6774..9880f74 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -199,7 +199,8 @@ void loadDocument(const std::wstring &_fileName) document.clearUndoStack(); document.clearRedoStack(); - + trackView->setDocument(&document); + SendMessage(hwnd, WM_CURRVALDIRTY, 0, 0); InvalidateRect(trackViewWin, NULL, FALSE); } diff --git a/editor/trackview.h b/editor/trackview.h index d4beaa2..814f344 100644 --- a/editor/trackview.h +++ b/editor/trackview.h @@ -21,8 +21,13 @@ public: HWND create(HINSTANCE hInstance, HWND hwndParent); HWND getWin() const { return hwnd; } - - void setDocument(SyncDocument *document) { this->document = document; } + + void setDocument(SyncDocument *document) + { + this->document = document; + this->setupScrollBars(); + } + const SyncDocument *getDocument() const { return document; } SyncDocument *getDocument() { return document; }