Преглед на файлове

PDF工具 - 快捷工具个数判断错误的问题

chenrongqian преди 2 години
родител
ревизия
75da419ea6
променени са 2 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 1 1
      PDF Office/Helper/PDFToolsHelper.cs
  2. 2 0
      PDF Office/Views/HomePanel/PDFTools/PDFToolsContent.xaml.cs

+ 1 - 1
PDF Office/Helper/PDFToolsHelper.cs

@@ -339,7 +339,7 @@ namespace PDF_Office.Helper
                 int currentCount = 0;
                 int currentCount = 0;
                 foreach (var cacheItem in cacheList)
                 foreach (var cacheItem in cacheList)
                 {
                 {
-                    if (cacheItem.ToolLayOutType == 1 && currentCount < QuickToolCount)
+                    if (cacheItem.ToolLayOutType == 1 && currentCount <= QuickToolCount)
                     {
                     {
                         foreach (var allItem in AllTools)
                         foreach (var allItem in AllTools)
                         {
                         {

+ 2 - 0
PDF Office/Views/HomePanel/PDFTools/PDFToolsContent.xaml.cs

@@ -298,6 +298,8 @@ namespace PDF_Office.Views.HomePanel.PDFTools
                 var targetId = target.ToolTypeId;
                 var targetId = target.ToolTypeId;
                 source.ToolTypeId = targetId;
                 source.ToolTypeId = targetId;
                 target.ToolTypeId = sourceId;
                 target.ToolTypeId = sourceId;
+                source.IsQuickTool = true;
+                target.IsQuickTool = true;
 
 
                 ShortEx.Items.Refresh();
                 ShortEx.Items.Refresh();
                 ListBoxCutsWidthChanged(ShortEx);
                 ListBoxCutsWidthChanged(ShortEx);