Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自動保存 #900

Merged
merged 15 commits into from
Jan 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
要素を除外したときの保存処理を修正
  • Loading branch information
yuto-trd committed Jan 22, 2024
commit 656564fcf21bc609d3d9851e34daf3f13ed06de2
8 changes: 8 additions & 0 deletions src/Beutl.ProjectSystem/ProjectSystem/Scene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,16 @@ private void Children_CollectionChanged(object? sender, NotifyCollectionChangedE
else if (e.Action == NotifyCollectionChangedAction.Add
&& e.NewItems != null)
{
string dirPath = Path.GetDirectoryName(FileName)!;
foreach (Element item in e.NewItems.OfType<Element>())
{
string rel = Path.GetRelativePath(dirPath, item.FileName).Replace('\\', '/');

if (_excludeElements.Contains(rel) && File.Exists(item.FileName))
{
_excludeElements.Remove(rel);
}

if (item.Range.Contains(CurrentFrame))
shouldRender = true;
}
Expand Down