Skip to content

Commit

Permalink
Fix a castexception when installing metapackage
Browse files Browse the repository at this point in the history
The install logic still  used a KeyValuePair<GuiMod, GuiModChangeTyp>
while everything else uses ModChange object's now
  • Loading branch information
Postremus committed Sep 5, 2015
1 parent e31433e commit 5edfbe6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions GUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -909,17 +909,18 @@ private void installFromckanToolStripMenuItem_Click(object sender, EventArgs e)
// Sneakily add our version in...
registry_manager.registry.AddAvailable(module);

var changeset = new List<KeyValuePair<GUIMod, GUIModChangeType>>();
changeset.Add(new KeyValuePair<GUIMod, GUIModChangeType>(
new GUIMod(module,registry_manager.registry,CurrentInstance.Version()), GUIModChangeType.Install));
var changeset = new List<ModChange>();
changeset.Add(new ModChange(
new GUIMod(module,registry_manager.registry,CurrentInstance.Version()),
GUIModChangeType.Install, null));

menuStrip1.Enabled = false;

RelationshipResolverOptions install_ops = RelationshipResolver.DefaultOpts();
install_ops.with_recommends = false;

m_InstallWorker.RunWorkerAsync(
new KeyValuePair<List<KeyValuePair<GUIMod, GUIModChangeType>>, RelationshipResolverOptions>(
new KeyValuePair<List<ModChange>, RelationshipResolverOptions>(
changeset, install_ops));
m_Changeset = null;

Expand Down

0 comments on commit 5edfbe6

Please sign in to comment.