瀏覽代碼

Fixed double refresh issue

Kenric Nugteren 1 年之前
父節點
當前提交
4fbf69f84c
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 4 0
      prs.desktop/Panels/Employees/EmployeePanel.xaml.cs
  2. 1 0
      prs.stores/PRSStores.projitems

+ 4 - 0
prs.desktop/Panels/Employees/EmployeePanel.xaml.cs

@@ -125,8 +125,11 @@ namespace PRSDesktop
         {
         {
         }
         }
 
 
+        private bool _loaded = false;
+
         private void Tab_SelectionChanged(object sender, SelectionChangedEventArgs e)
         private void Tab_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
         {
+            if (sender != Tab || !_loaded) return;
             RefreshCurrentTab();
             RefreshCurrentTab();
         }
         }
 
 
@@ -163,6 +166,7 @@ namespace PRSDesktop
         public void Refresh()
         public void Refresh()
         {
         {
             RefreshCurrentTab();
             RefreshCurrentTab();
+            _loaded = true;
         }
         }
 
 
         public string SectionName => "Employees";
         public string SectionName => "Employees";

+ 1 - 0
prs.stores/PRSStores.projitems

@@ -31,6 +31,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\DigitalFormDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\DigitalFormDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\EntityDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\EntityDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\JobDocumentSetSetMileStoneFileStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\JobDocumentSetSetMileStoneFileStore.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\JobScopeDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\MeetingItemDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\MeetingItemDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\SetoutDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityDocuments\SetoutDocumentStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityForms\AssignmentFormStore.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)EntityForms\AssignmentFormStore.cs" />