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
1 changed files with 4 additions and 4 deletions

View File

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