Skip to content

Commit

Permalink
Fixed error popups happening before a project is saved to disk.
Browse files Browse the repository at this point in the history
  • Loading branch information
vchelaru committed Jun 21, 2024
1 parent 8409a0f commit a1e5286
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CodeOutputPlugin/MainPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void HandleElementAdd(ElementSave element)

private void LoadCodeSettingsFile(ElementSave element)
{
if(element != null)
if(element != null && GumState.Self.ProjectState.GumProjectSave?.FullFileName != null)
{
control.CodeOutputElementSettings = CodeOutputElementSettingsManager.LoadOrCreateSettingsFor(element);
}
Expand Down
11 changes: 9 additions & 2 deletions StateAnimationPlugin/MainPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,17 @@ private void CreateViewModel()
}

var element = SelectedState.Self.SelectedElement;

if (currentlyReferencedElement != element)
{

mCurrentViewModel = AnimationCollectionViewModelManager.Self.GetAnimationCollectionViewModel(element);
if(GumState.Self.ProjectState.GumProjectSave?.FullFileName == null)
{
mCurrentViewModel = null;
}
else
{
mCurrentViewModel = AnimationCollectionViewModelManager.Self.GetAnimationCollectionViewModel(element);
}

if (mCurrentViewModel != null)
{
Expand Down

0 comments on commit a1e5286

Please sign in to comment.