mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
Better handing of unsupported file types
This commit is contained in:
parent
d39dd12389
commit
d3f1924690
|
|
@ -395,6 +395,16 @@ namespace FModel.ViewModels
|
|||
TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector(ext);
|
||||
switch (ext)
|
||||
{
|
||||
case "uasset":
|
||||
case "umap":
|
||||
{
|
||||
var exports = Provider.LoadObjectExports(fullPath);
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(exports, Formatting.Indented), bulkSave);
|
||||
|
||||
if (bulkSave || !exports.Any(CheckExport))
|
||||
TabControl.SelectedTab.Image = null;
|
||||
break;
|
||||
}
|
||||
case "ini":
|
||||
case "txt":
|
||||
case "log":
|
||||
|
|
@ -511,11 +521,8 @@ namespace FModel.ViewModels
|
|||
}
|
||||
default:
|
||||
{
|
||||
var exports = Provider.LoadObjectExports(fullPath);
|
||||
TabControl.SelectedTab.SetDocumentText(JsonConvert.SerializeObject(exports, Formatting.Indented), bulkSave);
|
||||
|
||||
if (bulkSave || !exports.Any(CheckExport))
|
||||
TabControl.SelectedTab.Image = null;
|
||||
FLogger.AppendWarning();
|
||||
FLogger.AppendText($"The file '{fullPath.SubstringAfterLast('/').SubstringBeforeLast('.')}' is an unknown file type. If this is a mistake, we are already working to fix it!", Constants.WHITE, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user