diff --git a/editor/editor.cpp b/editor/editor.cpp index b59c386..ee091a4 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; }