Browse Source

Merge pull request #918 from PixiEditor/fixes/1.05.2025

Fixes/1.05.2025
Krzysztof Krysiński 3 months ago
parent
commit
1bae50f5bf

+ 8 - 1
src/PixiEditor/Models/Serialization/Factories/RectangleSerializationFactory.cs

@@ -15,6 +15,7 @@ internal class RectangleSerializationFactory : VectorShapeSerializationFactory<R
     {
         builder.AddVecD(original.Center);
         builder.AddVecD(original.Size);
+        builder.AddDouble(original.CornerRadius);
     }
 
     protected override bool DeserializeVectorData(ByteExtractor extractor, Matrix3X3 matrix, Paintable strokePaintable,
@@ -24,6 +25,11 @@ internal class RectangleSerializationFactory : VectorShapeSerializationFactory<R
     {
         VecD center = extractor.GetVecD();
         VecD size = extractor.GetVecD();
+        double cornerRadius = 0;
+        if (!IsFilePreVersion(serializerData, new Version(2, 0, 0, 81)))
+        {
+            cornerRadius = extractor.GetDouble();
+        }
 
         original = new RectangleVectorData(center, size)
         {
@@ -31,7 +37,8 @@ internal class RectangleSerializationFactory : VectorShapeSerializationFactory<R
             FillPaintable = fillPaintable,
             StrokeWidth = strokeWidth,
             TransformationMatrix = matrix,
-            Fill = fill
+            Fill = fill,
+            CornerRadius = cornerRadius
         };
 
         return true;

+ 2 - 2
src/PixiEditor/Properties/AssemblyInfo.cs

@@ -41,5 +41,5 @@ using System.Runtime.InteropServices;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.80")]
-[assembly: AssemblyFileVersion("2.0.0.80")]
+[assembly: AssemblyVersion("2.0.0.81")]
+[assembly: AssemblyFileVersion("2.0.0.81")]

+ 5 - 1
src/PixiEditor/Views/Input/EditableTextBlock.axaml.cs

@@ -113,10 +113,14 @@ internal partial class EditableTextBlock : UserControl
 
     private void TextBox_KeyDown(object sender, KeyEventArgs e)
     {
-        if (e.Key == Key.Enter)
+        if (e.Key is Key.Enter or Key.Escape)
         {
             DisableEditing();
+            e.Handled = true;
+            return;
         }
+
+        e.Handled = e.Key is Key.Left or Key.Right;
     }
 
     private void TextBox_LostFocus(object? sender, RoutedEventArgs routedEventArgs)