From e05b1ad82827d706259b6719ba59cd23fe6a0fc2 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 14 Mar 2012 02:07:45 +0000 Subject: [PATCH] [ENHANCEMENT] Enhance doc map. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@881 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/NppCommands.cpp | 3 ++- PowerEditor/src/NppNotification.cpp | 3 ++- .../src/WinControls/DocumentMap/documentMap.cpp | 12 ++++++------ .../src/WinControls/DocumentMap/documentMap.h | 9 +++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 63fb2e71..57764e1f 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -1159,7 +1159,8 @@ void Notepad_plus::command(int id) if (_pDocMap) { - _pDocMap->wrapActionDone(); + _pDocMap->initWrapMap(); + _pDocMap->wrapMap(); } break; } diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index aedbe35a..bdd5cc30 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -541,7 +541,8 @@ BOOL Notepad_plus::notify(SCNotification *notification) if (_pDocMap) { - _pDocMap->guiUpdate(); + _pDocMap->wrapMap(); + _pDocMap->scrollMap(); } break; } diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index 229c2f0e..540bbd2a 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -72,18 +72,18 @@ void DocumentMap::initWrapMap() _pScintillaEditView->redraw(true); } } - +/* void DocumentMap::guiUpdate() { - if (_wrapUnwrapTriggered) + //if (_wrapUnwrapTriggered) { - initWrapMap(); - wrapMap(); + //initWrapMap(); + } - scrollMap(); + _wrapUnwrapTriggered = false; } - +*/ /* double ddd = (double)Xlength1/(double)Xlength2; char dchar[256]; diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.h b/PowerEditor/src/WinControls/DocumentMap/documentMap.h index 3f4919ee..985f9ac0 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.h +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.h @@ -108,18 +108,19 @@ public: void scrollMap(bool direction, moveMode whichMode); void doMove(); void fold(int line, bool foldOrNot); + void setMainEditorWrap(bool isWrap) { _isMainEditorWrap = isWrap; }; bool isMainEditorWrap() const { return _isMainEditorWrap; }; - +/* void wrapActionDone() { _wrapUnwrapTriggered = true; }; - - void guiUpdate(); +*/ + //void guiUpdate(); protected: virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); @@ -132,7 +133,7 @@ private: //HWND _glassHandle; ViewZoneDlg _vzDlg; bool _isMainEditorWrap; - bool _wrapUnwrapTriggered; + //bool _wrapUnwrapTriggered; // for needToRecomputeWith function int _displayZoom;