From 671e7b1b4db6cf2c4ddb3940b83d4bf208d3000f Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 14 Mar 2012 20:47:01 +0000 Subject: [PATCH] [ENHANCEMENT] Doc map: Improve wrapping operation. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@882 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 9 ++++++--- .../src/WinControls/DocumentMap/documentMap.cpp | 13 +------------ .../src/WinControls/DocumentMap/documentMap.h | 9 ++------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f1318757..9afb28ad 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4795,18 +4795,21 @@ void Notepad_plus::launchDocMap() data.dlgID = IDM_VIEW_DOC_MAP; ::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data); - _pDocMap->setMainEditorWrap(_pEditView->isWrap()); + //_pDocMap->setMainEditorWrap(_pEditView->isWrap()); } else { + /* // Disable wrap text if (!_pDocMap->isVisible()) { _pDocMap->setMainEditorWrap(_pEditView->isWrap()); } + */ } - //_mainEditView.wrap(false); - //_subEditView.wrap(false); + + _pDocMap->initWrapMap(); + _pDocMap->wrapMap(); _pDocMap->display(); } diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index 540bbd2a..93d6f235 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -72,18 +72,7 @@ void DocumentMap::initWrapMap() _pScintillaEditView->redraw(true); } } -/* -void DocumentMap::guiUpdate() -{ - //if (_wrapUnwrapTriggered) - { - //initWrapMap(); - - } - - _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 985f9ac0..b5e0cfc5 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.h +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.h @@ -108,19 +108,14 @@ 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(); protected: virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); @@ -132,7 +127,7 @@ private: ScintillaEditView *_pScintillaEditView; //HWND _glassHandle; ViewZoneDlg _vzDlg; - bool _isMainEditorWrap; + //bool _isMainEditorWrap; //bool _wrapUnwrapTriggered; // for needToRecomputeWith function