From 36b21e456c54a3326fe963e3ec67310d84d33591 Mon Sep 17 00:00:00 2001 From: donho Date: Thu, 20 Sep 2007 23:11:44 +0000 Subject: [PATCH] [BUG_FIXED] Fix the Styler Configurator display bug while the absence of global override entry in styles.xml. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@41 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 5 ++++- PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp | 5 ++--- PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 29ed7cf1..c2df1dd0 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -5946,7 +5946,6 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa _statusBar.reSizeTo(rc); getMainClientRect(rc); - //_pMainWindow->reSizeTo(rc); _dockingManager.reSizeTo(rc); mkPosIncFindDlg(); @@ -5988,7 +5987,11 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa pFn = (char *)fnss.getFileName(i); doOpen((const char *)pFn); if (lt != L_TXT) + { _pEditView->setCurrentDocType(lt); + setLangStatus(lt); + checkLangsMenu(-1); + } _pEditView->execute(SCI_GOTOLINE, ln-1); } //setLangStatus(_pEditView->getCurrentDocType()); diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp index 0a29758e..b3dd1ce7 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp @@ -140,7 +140,7 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar } updateGlobalOverrideCtrls(); - + setVisualFromStyleList(); goToCenter(); return TRUE; } @@ -525,8 +525,7 @@ void WordStyleDlg::setStyleListFromLexer(int index) void WordStyleDlg::setVisualFromStyleList() { - if (_isShownGOCtrls) - showGlobalOverrideCtrls(false); + showGlobalOverrideCtrls(false); Style & style = getCurrentStyler(); diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h index 0c2a695a..2a4a7d0f 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h @@ -64,7 +64,7 @@ private : class WordStyleDlg : public StaticDialog { public : - WordStyleDlg():_isDirty(false), _isSync(true){_originalWarning[0] = '\0';}; + WordStyleDlg():_isDirty(false), _isSync(true), _isShownGOCtrls(false){_originalWarning[0] = '\0';}; void init(HINSTANCE hInst, HWND parent) { Window::init(hInst, parent);