Skip to content

Commit

Permalink
Merge pull request #350 from udoe/master
Browse files Browse the repository at this point in the history
FIX: Non-present sources don't get removed when a .dbconf file is loaded.
  • Loading branch information
janwilmans committed Mar 17, 2019
2 parents e2c804b + 92d9308 commit 395d3a9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions DebugView++/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ void CMainFrame::LoadConfiguration(const std::wstring& fileName)
CloseView(i);
}

// The Sources child might not be present!
std::vector<SourceInfo> sourceInfos;
auto sourcesPt = pt.get_child_optional("DebugViewPP.Sources");
if (sourcesPt)
{
Expand All @@ -974,15 +974,13 @@ void CMainFrame::LoadConfiguration(const std::wstring& fileName)

std::sort(sources.begin(), sources.end(), [](const SourceInfoHelper& si1, const SourceInfoHelper& si2) { return si1.index < si2.index; });

std::vector<SourceInfo> sourceInfos;
for (const auto& helper : sources)
{
sourceInfos.push_back(helper.sourceInfo);
}
UpdateLogSources(sourceInfos);

m_sourceInfos = sourceInfos;
}
UpdateLogSources(sourceInfos);
m_sourceInfos = sourceInfos;
}

void CMainFrame::SaveConfiguration(const std::wstring& fileName)
Expand Down

0 comments on commit 395d3a9

Please sign in to comment.