mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Additional change to 720ed17: Now the sections that the included file has are placed to the last position if @include is placed on the last section in the original file.
This commit is contained in:
parent
071b6f78bb
commit
b66875d8ad
@ -1326,13 +1326,24 @@ void CConfigParser::ReadIniFile(const std::wstring& iniFile, LPCTSTR skinSection
|
|||||||
|
|
||||||
if (resetInsertPos)
|
if (resetInsertPos)
|
||||||
{
|
{
|
||||||
for (auto it = m_Sections.cbegin(); it != m_Sections.cend(); ++it)
|
auto jt = iter;
|
||||||
|
if (++jt == sections.end()) // Special case: @include was used in the last section of the current file
|
||||||
{
|
{
|
||||||
if (_wcsicmp((*it).c_str(), sectionName) == 0)
|
// Set the insertion place to the last
|
||||||
|
m_SectionInsertPos = m_Sections.end();
|
||||||
|
resetInsertPos = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Find the appropriate insertion place
|
||||||
|
for (auto it = m_Sections.cbegin(); it != m_Sections.cend(); ++it)
|
||||||
{
|
{
|
||||||
m_SectionInsertPos = ++it;
|
if (_wcsicmp((*it).c_str(), sectionName) == 0)
|
||||||
resetInsertPos = false;
|
{
|
||||||
break;
|
m_SectionInsertPos = ++it;
|
||||||
|
resetInsertPos = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user