Skip to content

Commit 2491c89

Browse files
committed
Reset rcol/navmesh file picker state when value is changed through combo inputs
1 parent 08eece6 commit 2491c89

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ContentEditor.App/EditMode/NavmeshEditor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public override void DrawMainUI()
7777
}
7878
if (ImguiHelpers.ValueCombo("Stored Files", storedSuggestions, storedSuggestions, ref filepath)) {
7979
AppConfig.Instance.AddRecentNavmesh(filepath);
80+
filePicker?.ResetState();
8081
}
8182
}
8283
map.visibleContentTypes = displayedContentTypes;
@@ -87,6 +88,7 @@ public override void DrawMainUI()
8788
var options = settings.RecentNavmeshes.ToArray();
8889
if (ImguiHelpers.ValueCombo("Recent", options, options, ref filepath)) {
8990
AppConfig.Instance.AddRecentNavmesh(filepath);
91+
filePicker?.ResetState();
9092
}
9193
}
9294
context.children[1].ShowUI();

ContentEditor.App/EditMode/RcolEditMode.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public override void DrawMainUI()
6767
if (storedSuggestions.Length > 0) {
6868
if (ImguiHelpers.ValueCombo("Component Files", storedSuggestions, storedSuggestions, ref rcolPath)) {
6969
AppConfig.Instance.AddRecentRcol(rcolPath);
70+
filePicker?.ResetState();
7071
}
7172
}
7273
}
@@ -76,6 +77,7 @@ public override void DrawMainUI()
7677
var options = settings.RecentRcols.ToArray();
7778
if (ImguiHelpers.ValueCombo("Recent", options, options, ref rcolPath)) {
7879
AppConfig.Instance.AddRecentRcol(rcolPath);
80+
filePicker?.ResetState();
7981
}
8082
}
8183

0 commit comments

Comments
 (0)