1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-06 00:05:59 +02:00

Improved settings reloading recent file menu item updating

This commit is contained in:
Brian Fiete 2023-06-01 08:00:16 -04:00
parent c1f4466dd1
commit ed444416f0
4 changed files with 27 additions and 9 deletions

View file

@ -1106,12 +1106,24 @@ namespace IDE
public bool mEnableDevMode;
public TutorialsFinished mTutorialsFinished = .();
public this()
{
SetDefaults();
}
public this(Settings prevSettings)
{
Swap!(mRecentFiles, prevSettings.mRecentFiles);
for (var recent in mRecentFiles.mRecents)
{
recent.mList.ClearAndDeleteItems();
for (var item in recent.mMenuItems)
item.Dispose();
recent.mMenuItems.ClearAndDeleteItems();
}
}
public void SetDefaults()
{
mVSSettings.SetDefaults();
@ -1192,6 +1204,9 @@ namespace IDE
public bool WantsReload()
{
if (mSettingFileDateTime == default)
return false;
String path = scope .();
GetSettingsPath(path);