Browse Source

Slecting da open document

CPKreuz 4 years ago
parent
commit
20e030249b
1 changed files with 9 additions and 0 deletions
  1. 9 0
      PixiEditor/ViewModels/SubViewModels/Main/FileViewModel.cs

+ 9 - 0
PixiEditor/ViewModels/SubViewModels/Main/FileViewModel.cs

@@ -66,6 +66,15 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
         {
             string path = (string)parameter;
 
+            foreach (Document document in Owner.BitmapManager.Documents)
+            {
+                if (document.DocumentFilePath == path)
+                {
+                    Owner.BitmapManager.ActiveDocument = document;
+                    return;
+                }
+            }
+
             if (!File.Exists(path))
             {
                 NoticeDialog.Show("The file does no longer exist at that path");