|
@@ -972,6 +972,12 @@ namespace PRSDesktop
|
|
documents = new Client<SetoutDocument>().Load(
|
|
documents = new Client<SetoutDocument>().Load(
|
|
new Filter<SetoutDocument>(x => x.EntityLink.ID).IsEqualTo(CurrentKanban.SetoutID));
|
|
new Filter<SetoutDocument>(x => x.EntityLink.ID).IsEqualTo(CurrentKanban.SetoutID));
|
|
foreach (var document in documents)
|
|
foreach (var document in documents)
|
|
|
|
+ {
|
|
|
|
+ // If this document is actually the cutting group document,
|
|
|
|
+ // redirect any annotations to the cutting group id rather than the setout
|
|
|
|
+ if (document.EntityLink.Group.ID == packet.SetoutLink.Group.ID);
|
|
|
|
+ document.ID = packet.SetoutLink.Group.ID;
|
|
|
|
+
|
|
if (document.DocumentLink != null && document.DocumentLink.FileName != null)
|
|
if (document.DocumentLink != null && document.DocumentLink.FileName != null)
|
|
if (document.DocumentLink.FileName.ToLower().EndsWith(".pdf") ||
|
|
if (document.DocumentLink.FileName.ToLower().EndsWith(".pdf") ||
|
|
document.DocumentLink.FileName.ToLower().EndsWith(".png") ||
|
|
document.DocumentLink.FileName.ToLower().EndsWith(".png") ||
|
|
@@ -986,9 +992,11 @@ namespace PRSDesktop
|
|
pdfbtn.Click += ViewDrawing;
|
|
pdfbtn.Click += ViewDrawing;
|
|
ButtonStack.Children.Add(pdfbtn);
|
|
ButtonStack.Children.Add(pdfbtn);
|
|
if (document.Superceded.IsEmpty())
|
|
if (document.Superceded.IsEmpty())
|
|
- if ((PDFEditor != null && PDFEditor.Document.ID.Equals(document.ID)) || firstbutton == null)
|
|
|
|
|
|
+ if ((PDFEditor != null && PDFEditor.Document.ID.Equals(document.ID)) ||
|
|
|
|
+ firstbutton == null)
|
|
firstbutton = pdfbtn;
|
|
firstbutton = pdfbtn;
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
|
|
if (firstbutton == null)
|
|
if (firstbutton == null)
|
|
firstbutton = qabtn;
|
|
firstbutton = qabtn;
|