mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Revert "Fixed masterlist and userlist messages not shown."
This reverts commit 98073c355e.
This commit is contained in:
@@ -105,18 +105,15 @@ namespace loot {
|
||||
std::list<vertex_t> sortedVertices;
|
||||
boost::topological_sort(graph, std::front_inserter(sortedVertices), boost::vertex_index_map(v_index_map));
|
||||
|
||||
/* Sorting now evaluates conditions inside the graph, so existing plugins list is missing
|
||||
data present in the graph, so we need to swap the two lists. */
|
||||
BOOST_LOG_TRIVIAL(info) << "Calculated order: ";
|
||||
plugins.clear();
|
||||
list<string> tempPlugins;
|
||||
for (const auto &vertex: sortedVertices) {
|
||||
BOOST_LOG_TRIVIAL(info) << '\t' << graph[vertex].Name();
|
||||
plugins.push_back(graph[vertex]);
|
||||
tempPlugins.push_back(graph[vertex].Name());
|
||||
}
|
||||
|
||||
|
||||
//Now sort exist plugins list according to order in tempPlugins.
|
||||
/*plugins.sort([tempPlugins](const Plugin& first, const Plugin& second){
|
||||
plugins.sort([tempPlugins](const Plugin& first, const Plugin& second){
|
||||
//Find both plugins, and compare distances from beginning.
|
||||
auto fIt = find(tempPlugins.begin(), tempPlugins.end(), first);
|
||||
auto sIt = find(tempPlugins.begin(), tempPlugins.end(), second);
|
||||
@@ -126,7 +123,6 @@ namespace loot {
|
||||
|
||||
return distance(tempPlugins.begin(), fIt) < distance(tempPlugins.begin(), sIt);
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
void CheckForCycles(const PluginGraph& graph) {
|
||||
|
||||
+9
-13
@@ -715,18 +715,6 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
|
||||
list<loot::Plugin> plugins;
|
||||
for (auto &plugin : _game->plugins) {
|
||||
plugins.push_back(plugin.second);
|
||||
|
||||
// Merge the masterlist data down into the plugins now, as userlist changes won't affect
|
||||
// it.
|
||||
BOOST_LOG_TRIVIAL(trace) << "Merging for plugin \"" << plugins.back().Name() << "\"";
|
||||
|
||||
//Check if there is a plugin entry in the masterlist. This will also find matching regex entries.
|
||||
list<loot::Plugin>::iterator pos = std::find(_game->masterlist.plugins.begin(), _game->masterlist.plugins.end(), plugins.back());
|
||||
|
||||
if (pos != _game->masterlist.plugins.end()) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Merging masterlist data down to plugin list data.";
|
||||
plugins.back().MergeMetadata(*pos);
|
||||
}
|
||||
}
|
||||
try {
|
||||
bool applyLoadOrder = false;
|
||||
@@ -743,8 +731,16 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
|
||||
for (boost::tie(vit, vitend) = boost::vertices(graph); vit != vitend; ++vit) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Merging for plugin \"" << graph[*vit].Name() << "\"";
|
||||
|
||||
//Check if there is a plugin entry in the masterlist. This will also find matching regex entries.
|
||||
list<loot::Plugin>::iterator pos = std::find(_game->masterlist.plugins.begin(), _game->masterlist.plugins.end(), graph[*vit]);
|
||||
|
||||
if (pos != _game->masterlist.plugins.end()) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Merging masterlist data down to plugin list data.";
|
||||
graph[*vit].MergeMetadata(*pos);
|
||||
}
|
||||
|
||||
//Check if there is a plugin entry in the userlist. This will also find matching regex entries.
|
||||
list<loot::Plugin>::iterator pos = std::find(_game->userlist.plugins.begin(), _game->userlist.plugins.end(), graph[*vit]);
|
||||
pos = std::find(_game->userlist.plugins.begin(), _game->userlist.plugins.end(), graph[*vit]);
|
||||
|
||||
if (pos != _game->userlist.plugins.end() && pos->Enabled()) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Merging userlist data down to plugin list data.";
|
||||
|
||||
Reference in New Issue
Block a user