瀏覽代碼

Fixed bug on digital form dock and added images for new "View Entity" button

Kenric Nugteren 1 年之前
父節點
當前提交
e3ec63d74b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      prs.desktop/DockPanels/DigitalForms/DigitalFormDockGrid.cs

+ 2 - 2
prs.desktop/DockPanels/DigitalForms/DigitalFormDockGrid.cs

@@ -114,7 +114,7 @@ public class DigitalFormDockGrid : DynamicGrid<DigitalFormDockModel>
 
         if (Security.CanView<TEntity>())
         {
-            menu.AddItem($"View {typeof(TEntity).Name}", null, formModel, ViewEntity_Click<TEntity>);
+            menu.AddItem($"View {typeof(TEntity).Name}", Images.GetValueOrDefault(typeof(TEntityForm)), formModel, ViewEntity_Click<TEntity>);
         }
 
         var moduleTask = Task.Run(() =>
@@ -228,7 +228,7 @@ public class DigitalFormDockGrid : DynamicGrid<DigitalFormDockModel>
             menu.AddItem("Set Job Scope", PRSDesktop.Resources.project, formModel,
                 SetJobScope_ClickMethod.MakeGenericMethod(typeof(TEntity)).CreateDelegate<Action<DigitalFormDockModel>>());
         }
-        else if (typeof(TEntity) == typeof(Job) && typeof(TEntity) == typeof(JobForm))
+        else if (typeof(TEntity) == typeof(Job) && typeof(TEntityForm) == typeof(JobForm))
         {
             menu.AddSeparatorIfNeeded();
             menu.AddItem("Set Job Scope", PRSDesktop.Resources.project, formModel, SetJobScopeFromJob_Click);