Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
- [GUI] bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Razmoth committed Nov 25, 2023
1 parent 89a3543 commit 148969c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion AssetStudio.GUI/AssetBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private void clear_Click(object sender, EventArgs e)
}
private void loadSelected_Click(object sender, EventArgs e)
{
var files = assetDataGridView.SelectedRows.Cast<DataGridViewRow>().Select(x => x.DataBoundItem as AssetEntry).Select(x => x.Source).ToHashSet();
var files = assetDataGridView.SelectedRows.Cast<DataGridViewRow>().Select(x => _assetEntries[x.Index]).Select(x => x.Source).ToHashSet();
var missingFiles = files.Where(x => !File.Exists(x));
foreach (var file in missingFiles)
{
Expand Down Expand Up @@ -98,6 +98,7 @@ private void searchTextBox_KeyPress(object sender, KeyPressEventArgs e)

_assetEntries = ResourceMap.GetEntries().FindAll(x => x.Matches(filters));

assetDataGridView.CurrentCell = assetDataGridView[0, 0];
assetDataGridView.Rows.Clear();
assetDataGridView.RowCount = _assetEntries.Count;
assetDataGridView.Refresh();
Expand Down Expand Up @@ -159,6 +160,7 @@ private void AssetListView_ColumnHeaderMouseClick(object sender, DataGridViewCel

_assetEntries = direction == ListSortDirection.Ascending ? _assetEntries.OrderBy(keySelector).ToList() : _assetEntries.OrderByDescending(keySelector).ToList();

assetDataGridView.CurrentCell = assetDataGridView[0, 0];
assetDataGridView.Rows.Clear();
assetDataGridView.RowCount = _assetEntries.Count;
assetDataGridView.Refresh();
Expand Down
3 changes: 2 additions & 1 deletion AssetStudio.GUI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,8 @@ private void StatusStripUpdate(string statusText)
{
if (InvokeRequired)
{
BeginInvoke(new Action(() => { toolStripStatusLabel1.Text = statusText; }));
var result = BeginInvoke(() => { toolStripStatusLabel1.Text = statusText; });
result.AsyncWaitHandle.WaitOne();
}
else
{
Expand Down

0 comments on commit 148969c

Please sign in to comment.