From d320a022d366eb28a471706d4683a469818bf455 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 5 Nov 2013 18:39:25 +0000 Subject: [PATCH] [BUG_FIXED] Fix the bug that Global Styles are not loaded completely in Stylers Configurator. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1145 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 5 +---- PowerEditor/src/Parameters.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 6f57b9d87..974b6d8ff 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2213,13 +2213,10 @@ void Notepad_plus::addHotSpot() hotspotStyle._styleID = static_cast(style_hotspot); _pEditView->execute(SCI_STYLEGETFONT, idStyleMSBunset, (LPARAM)fontNameA); TCHAR *generic_fontname = new TCHAR[128]; -#ifdef UNICODE + WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance(); const wchar_t * fontNameW = wmc->char2wchar(fontNameA, _nativeLangSpeaker.getLangEncoding()); lstrcpy(generic_fontname, fontNameW); -#else - lstrcpy(generic_fontname, fontNameA); -#endif hotspotStyle._fontName = generic_fontname; hotspotStyle._fgColor = _pEditView->execute(SCI_STYLEGETFORE, idStyleMSBunset); diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 65dc1e7d6..4b87e020c 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -385,7 +385,7 @@ public: return _styleArray[index]; }; - bool hasEnoughSpace() {return (_nbStyler < SCE_USER_STYLE_TOTAL_STYLES);}; + bool hasEnoughSpace() {return (_nbStyler < SCE_STYLE_ARRAY_SIZE);}; void addStyler(int styleID, TiXmlNode *styleNode); void addStyler(int styleID, const TCHAR *styleName) {