Fix docking panel crash due to messing up config.xml
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/13084#issuecomment-1783787209
This commit is contained in:
parent
5c80be7667
commit
e2fb15a703
|
@ -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)
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue