Skip to content

Commit

Permalink
Set default OpenFileDialog result to Cancel;
Browse files Browse the repository at this point in the history
  • Loading branch information
onepiecefreak3 committed Nov 17, 2023
1 parent 58b63ff commit 0766033
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ImGui.Forms/ImGui.Forms.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Imgui.Forms</id>
<version>1.0.38</version>
<version>1.0.39</version>
<description>A WinForms-inspired object-oriented framework around Dear ImGui (https://github.com/ocornut/imgui)</description>

<authors>onepiecefreak</authors>
Expand Down
5 changes: 3 additions & 2 deletions ImGui.Forms/Modals/IO/OpenFileDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.IO;
using System.Linq;
using System.Numerics;
using System.Threading.Tasks;
using ImGui.Forms.Controls;
using ImGui.Forms.Controls.Layouts;
using ImGui.Forms.Controls.Lists;
Expand Down Expand Up @@ -91,6 +90,8 @@ public OpenFileDialog()

#endregion

Result = DialogResult.Cancel;

var width = (int)Math.Ceiling(Application.Instance.MainForm.Width * .9f);
var height = (int)Math.Ceiling(Application.Instance.MainForm.Height * .8f);
Size = new Vector2(width, height);
Expand Down Expand Up @@ -438,7 +439,7 @@ private void _searchTextBox_TextChanged(object sender, EventArgs e)

#endregion

private class FileEntry
class FileEntry
{
public string Name { get; set; }
public string Type { get; set; }
Expand Down

0 comments on commit 0766033

Please sign in to comment.