Browse Source

DataEntryDocumentWindow now loads entire document when viewing a given document, instead of just one page.

Kenric Nugteren 5 months ago
parent
commit
1ddfdde045

+ 1 - 1
prs.desktop/Panels/DataEntry/DataEntryDocumentWindow.xaml

@@ -18,7 +18,7 @@
             </ItemsControl.ItemsPanel>
             <ItemsControl.ItemTemplate>
                 <DataTemplate DataType="ImageSource">
-                    <Image Source="{Binding}"/>
+                    <Image Source="{Binding}" Margin="0,0,0,5"/>
                 </DataTemplate>
             </ItemsControl.ItemTemplate>
         </ItemsControl>

+ 8 - 1
prs.desktop/Panels/DataEntry/DocumentViewList.cs

@@ -146,6 +146,7 @@ public abstract class DocumentViewList<TDocument> : UserControl, INotifyProperty
         {
             var img = new Image();
             img.Bind<ImageSource, ImageSource>(Image.SourceProperty, x => x);
+            img.Margin = new(0, 0, 0, 5);
             img.ContextMenu = itemsControl.ContextMenu;
             img.MouseLeftButtonDown += Img_MouseLeftButtonDown;
             return img;
@@ -411,9 +412,15 @@ public abstract class DocumentViewList<TDocument> : UserControl, INotifyProperty
         }
         else
         {
+            var docID = GetDocumentID(ViewDocuments.First(x => x.Image == image).Document);
+            var docs = ViewDocuments.Where(x => GetDocumentID(x.Document) == docID);
+
             window = new DataEntryDocumentWindow();
             window.Topmost = true;
-            window.Images.Add(image);
+            foreach(var doc in docs)
+            {
+                window.Images.Add(doc.Image);
+            }
             OpenWindows.Add(window);
             window.Closed += OpenWindow_Closed;
             window.Show();