瀏覽代碼

图片编辑-属性面板裁剪时透明度重影bug修复

lvle 1 年之前
父節點
當前提交
0011271af7

+ 2 - 3
PDF Office/ViewModels/Tools/TextEditToolContentViewModel.cs

@@ -761,10 +761,9 @@ namespace PDF_Master.ViewModels.Tools
                     openFileDialog.Filter = "Image Files(*.jpg;*.jpeg;*.png;*.bmp)|*.jpg;*.jpeg;*.png;*.bmp;";
                     if (openFileDialog.ShowDialog() == true)
                     {                 
-                    PDFViewer.AddPDFEditImage(openFileDialog.FileName,500,500);
+                    PDFViewer.AddPDFEditImage(CompressImage(openFileDialog.FileName, 800), 500,500);
                     events.GetEvent<PageEditNotifyEvent>().Publish(new PageEditNotifyEventArgs(unicode));
-                    }
-                    
+                }
                 }
             else if(e.NotifyType == CustomNotifyType.PDFEditImageResize)
             {

File diff suppressed because it is too large
+ 18 - 16
PDF Office/Views/PropertyPanel/PDFEdit/ImageEditProperty.xaml


+ 18 - 0
PDF Office/Views/PropertyPanel/PDFEdit/ImageEditProperty.xaml.cs

@@ -22,6 +22,7 @@ namespace PDF_Master.Views.PropertyPanel.PDFEdit
     public partial class ImageEditProperty : UserControl
     {
         public List<ComboDataItem> Items { get; private set; }
+        public ComboDataItem Items2;
         public ImageEditProperty()
         {
             InitializeComponent();
@@ -39,6 +40,23 @@ namespace PDF_Master.Views.PropertyPanel.PDFEdit
             item = new ComboDataItem(100,"%");
             Items.Add(item);
             slid.SetItemSource(Items);
+
         }
+
+
+        private void BtnReplace_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
+        {
+           
+            if (BtnReplace.IsEnabled == false)
+            {
+                Items2 = slid.combox.SelectedItems;
+                slid.combox.SelectedItems = null;
+            }
+              
+            else
+            {
+                slid.combox.SelectedItems = Items2 ;
+            }
+        } 
     }
 }