Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
fix integrating issues
Browse files Browse the repository at this point in the history
  • Loading branch information
atenfyr committed Nov 24, 2020
1 parent f31591b commit 475263e
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 17 deletions.
Binary file modified AstroModIntegrator.dll
Binary file not shown.
7 changes: 7 additions & 0 deletions Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 27 additions & 13 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public partial class Form1 : Form

public CoolDataGridView dataGridView1;
public Panel footerPanel;
public Panel tablePanel;

public Form1()
{
Expand Down Expand Up @@ -60,6 +59,7 @@ public Form1()
dataGridView1.DragDrop += new DragEventHandler(Form1_DragDrop);

PeriodicCheckTimer.Enabled = true;
CheckAllDirty.Enabled = true;

autoUpdater = new BackgroundWorker();
autoUpdater.DoWork += new DoWorkEventHandler(AutoUpdater_DoWork);
Expand All @@ -77,7 +77,11 @@ private void AutoUpdater_DoWork(object sender, DoWorkEventArgs e)

private void Simple_Refresh_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (System.Threading.SynchronizationContext.Current != null) TableManager.Refresh();
if (System.Threading.SynchronizationContext.Current != null)
{
TableManager.Refresh();
ModManager.FullUpdate();
}
}

public bool DownloadVersionSync(Mod thisMod, Version newVersion)
Expand Down Expand Up @@ -136,7 +140,7 @@ public void SwitchVersionSync(Mod thisMod, Version newVersion)
}

// The rest
private void DataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
private void ForceUpdateCells()
{
Task.Run(() =>
{
Expand Down Expand Up @@ -169,6 +173,26 @@ private void DataGridView1_CellValueChanged(object sender, DataGridViewCellEvent
});
}

private volatile bool IsAllDirty = false;
private void DataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
IsAllDirty = true;
}

private void CheckAllDirty_Tick(object sender, EventArgs e)
{
if (IsAllDirty)
{
ForceUpdateCells();
IsAllDirty = false;
}
}

private void PeriodicCheckTimer_Tick(object sender, EventArgs e)
{
ModManager.UpdateReadOnlyStatus();
}

public void AdjustModInfoText(string txt, string linkText = "")
{
this.modInfo.Text = txt + linkText;
Expand Down Expand Up @@ -608,16 +632,6 @@ private void loadButton_Click(object sender, EventArgs e)
selectorForm.ShowDialog(this);
}

private void PeriodicCheckTimer_Tick(object sender, EventArgs e)
{
ModManager.UpdateReadOnlyStatus();
}

private void ForceRefreshTimer_Tick(object sender, EventArgs e)
{
TableManager.Refresh();
}

private bool currentlySyncing = false;
private bool syncErrored = false;
private string syncErrorMessage;
Expand Down
3 changes: 3 additions & 0 deletions Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,7 @@
<metadata name="PeriodicCheckTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="CheckAllDirty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>176, 17</value>
</metadata>
</root>
3 changes: 1 addition & 2 deletions ModHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ public void UpdateAvailableVersionsFromIndexFiles()

if (mod.ForceLatest && latestVersion != null) BaseForm.SwitchVersionSync(mod, latestVersion);
}
FullUpdate();
}

public void AggregateIndexFiles()
Expand Down Expand Up @@ -840,9 +839,9 @@ public void FullUpdate()
Directory.CreateDirectory(DownloadPath);
Directory.CreateDirectory(InstallPath);

IntegrateMods();
SyncConfigToDisk();
SyncModsToDisk();
IntegrateMods();
}
catch (Exception ex)
{
Expand Down
Binary file modified UAssetAPI.dll
Binary file not shown.
7 changes: 5 additions & 2 deletions next_patch_notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Added the ability to double-click in the profile selector menu to quickload that profile.
* Added the ability to double-click in the profile selector menu to quickload a profile and the ability to press delete in the profile selector menu to quickly delete a profile.
* Fixed a bug where on certain machines the profile selector ListBox would display lines that are too short for the text within to fit.
* Fixed a bug where bordered controls would not render properly on certain machines.
* Fixed a bug where bordered controls would not render properly on certain machines.
* Fixed a bug where the current mod loadout on disk would desync with what is shown by the UI when the checkboxes are fired rapidly.
* Fixed a bug where the loader would sometimes not properly integrate after a change in mods.
* Updated the local copy of AstroModIntegrator to 1.1.

0 comments on commit 475263e

Please sign in to comment.