Fix last active tab is ignored on N++ restart issue

Fix #4716, fix #4755, close #4722
This commit is contained in:
Rajendra Singh 2018-08-01 00:05:01 +05:30 committed by Don HO
parent abc6bc144b
commit 90ab58aea8

View File

@ -2001,8 +2001,8 @@ bool NppParameters::getSessionFromXmlTree(TiXmlDocument *pSessionDoc, Session *p
return false; return false;
TiXmlElement *actView = sessionRoot->ToElement(); TiXmlElement *actView = sessionRoot->ToElement();
size_t index; int index = 0;
const TCHAR *str = actView->Attribute(TEXT("activeView"), reinterpret_cast<int *>(&index)); const TCHAR *str = actView->Attribute(TEXT("activeView"), &index);
if (str) if (str)
{ {
(*ptrSession)._activeView = index; (*ptrSession)._activeView = index;
@ -2016,9 +2016,9 @@ bool NppParameters::getSessionFromXmlTree(TiXmlDocument *pSessionDoc, Session *p
{ {
if (viewRoots[k]) if (viewRoots[k])
{ {
size_t index2; int index2 = 0;
TiXmlElement *actIndex = viewRoots[k]->ToElement(); TiXmlElement *actIndex = viewRoots[k]->ToElement();
str = actIndex->Attribute(TEXT("activeIndex"), reinterpret_cast<int *>(&index2)); str = actIndex->Attribute(TEXT("activeIndex"), &index2);
if (str) if (str)
{ {
if (k == 0) if (k == 0)