diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 3e61e5374..bb18ba5eb 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1063,9 +1063,9 @@ void Notepad_plus::saveDockingParams() { int floatCont = 0; - if (nppGUI._dockingData._pluginDockInfo[i]._currContainer >= DOCKCONT_MAX) + if (nppGUI._dockingData._pluginDockInfo[i]._currContainer <= DOCKCONT_MAX) floatCont = nppGUI._dockingData._pluginDockInfo[i]._currContainer; - else + else if (nppGUI._dockingData._pluginDockInfo[i]._prevContainer <= DOCKCONT_MAX) floatCont = nppGUI._dockingData._pluginDockInfo[i]._prevContainer; if (floatCont >= 0) diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 020d497aa..b616e2ddf 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -6582,12 +6582,11 @@ void NppParameters::feedDockingManager(TiXmlNode *node) const TCHAR *idStr = dlgElement->Attribute(TEXT("id"), &id); if (name && idStr) { - int curr = 0; // on left + int current = 0; // on left int prev = 0; // on left - dlgElement->Attribute(TEXT("curr"), &curr); + dlgElement->Attribute(TEXT("curr"), ¤t); dlgElement->Attribute(TEXT("prev"), &prev); - bool isVisible = false; const TCHAR *val = dlgElement->Attribute(TEXT("isVisible")); if (val) @@ -6595,7 +6594,7 @@ void NppParameters::feedDockingManager(TiXmlNode *node) isVisible = (lstrcmp(val, TEXT("yes")) == 0); } - _nppGUI._dockingData._pluginDockInfo.push_back(PluginDlgDockingInfo(name, id, curr, prev, isVisible)); + _nppGUI._dockingData._pluginDockInfo.push_back(PluginDlgDockingInfo(name, id, current, prev, isVisible)); } }