diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 4aee691b6..649ba3e46 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -1108,8 +1108,6 @@ void NppParameters::destroyInstance() { if (_pXmlDoc != NULL) { - if (_pXmlDoc->isDirty()) - _pXmlDoc->SaveFile(); delete _pXmlDoc; } @@ -4978,7 +4976,7 @@ bool NppParameters::insertTabInfo(const TCHAR *langName, int tabInfo) if (nm && lstrcmp(langName, nm) == 0) { childNode->ToElement()->SetAttribute(TEXT("tabSettings"), tabInfo); - _pXmlDoc->makeDirty(); + _pXmlDoc->SaveFile(); return true; } } diff --git a/PowerEditor/src/TinyXml/tinyxml.h b/PowerEditor/src/TinyXml/tinyxml.h index 4b8b532e4..6634b70f1 100644 --- a/PowerEditor/src/TinyXml/tinyxml.h +++ b/PowerEditor/src/TinyXml/tinyxml.h @@ -1095,13 +1095,6 @@ public: virtual void Print( FILE* cfile, int depth = 0 ) const; // [internal use] void SetError( int err, const TCHAR* errorLocation, TiXmlParsingData* prevData ); - void makeDirty() { - _isDirty = true; - }; - - bool isDirty() const { - return _isDirty; - }; protected : virtual void StreamOut ( TIXML_OSTREAM * out) const; @@ -1117,7 +1110,6 @@ private: TIXML_STRING errorDesc; int tabsize; TiXmlCursor errorLocation; - bool _isDirty; }; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index d48319bfb..9763509d0 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -1215,8 +1215,7 @@ BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara ValueDlg tabSizeDlg; tabSizeDlg.init(_hInst, _hParent, nppGUI._tabSize, TEXT("Tab Size : ")); POINT p; - ::GetCursorPos(&p);//::GetParent(::GetParent(_hParent)) - //::ScreenToClient(NULL, &p); + ::GetCursorPos(&p); int size = tabSizeDlg.doDialog(p); if (size == -1) return FALSE;