Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 84bfb78

Browse files
committed
refresh OB on save, and added comment
1 parent 7fa3efc commit 84bfb78

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

UI/Components/EditorElement/EditorElement.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,7 @@ public void Save(bool force = false)
903903
{
904904
using var fs = new FileStream(_FullFilePath, FileMode.Create, FileAccess.Write, FileShare.None);
905905
editor.Save(fs);
906+
Program.MainWindow.RefreshObjectBrowser();
906907
}
907908
catch (Exception e)
908909
{

UI/MainWindow/MainWindowObjectBrowser.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private void BtRefreshDir_Click(object sender, RoutedEventArgs e)
285285
/// <summary>
286286
/// Refreshes the object browser's items, remembering folding states.
287287
/// </summary>
288-
private void RefreshObjectBrowser()
288+
public void RefreshObjectBrowser()
289289
{
290290
// Delete context menu to prevent performing actions on potentially null elements
291291
ObjectBrowser.ContextMenu = null;
@@ -719,6 +719,9 @@ private static TreeViewItem VisualUpwardSearch(DependencyObject source)
719719
return source as TreeViewItem;
720720
}
721721

722+
/// <summary>
723+
/// Disables the File tab button of the Object Browser if there's no file opened in the editor.
724+
/// </summary>
722725
public void UpdateOBFileButton()
723726
{
724727
if (GetAllEditorElements() == null)

0 commit comments

Comments
 (0)