@ -3401,28 +3401,28 @@ bool NppParameters::writeProjectPanelsSettings() const
TiXmlNode * nppRoot = _pXmlUserDoc - > FirstChild ( TEXT ( " NotepadPlus " ) ) ;
if ( ! nppRoot ) return false ;
TiXmlNode * p rojPanelRootNode = nppRoot - > FirstChildElement ( TEXT ( " ProjectPanels " ) ) ;
if ( p rojPanelRootNode)
TiXmlNode * oldP rojPanelRootNode = nppRoot - > FirstChildElement ( TEXT ( " ProjectPanels " ) ) ;
if ( nullptr ! = oldP rojPanelRootNode)
{
// Erase the Project Panel root
nppRoot - > RemoveChild ( p rojPanelRootNode) ;
nppRoot - > RemoveChild ( oldP rojPanelRootNode) ;
}
// Create the Project Panel root
projPanelRootNode = new TiXmlElement ( TEXT ( " ProjectPanels " ) ) ;
TiXmlElement projPanelRootNode { TEXT ( " ProjectPanels " ) } ;
// Add 3 Project Panel parameters
for ( int i = 0 ; i < 3 ; + + i )
{
TiXmlElement projPanelNode ( TEXT ( " ProjectPanel " ) ) ;
TiXmlElement projPanelNode { TEXT ( " ProjectPanel " ) } ;
( projPanelNode . ToElement ( ) ) - > SetAttribute ( TEXT ( " id " ) , i ) ;
( projPanelNode . ToElement ( ) ) - > SetAttribute ( TEXT ( " workSpaceFile " ) , _workSpaceFilePathes [ i ] ) ;
( projPanelRootNode - > ToElement ( ) ) - > InsertEndChild ( projPanelNode ) ;
( projPanelRootNode . ToElement ( ) ) - > InsertEndChild ( projPanelNode ) ;
}
// (Re)Insert the Project Panel root
( nppRoot - > ToElement ( ) ) - > InsertEndChild ( * projPanelRootNode ) ;
( nppRoot - > ToElement ( ) ) - > InsertEndChild ( projPanelRootNode ) ;
return true ;
}