Browse Source

Fixed ToolSettingColorPicker

flabbet 4 years ago
parent
commit
3bc9329907

+ 5 - 5
PixiEditor/Models/Tools/Tools/PenTool.cs

@@ -22,7 +22,7 @@ namespace PixiEditor.Models.Tools.Tools
         private readonly BoolSetting pixelPerfectSetting;
         private readonly BoolSetting pixelPerfectSetting;
         private readonly LineTool lineTool;
         private readonly LineTool lineTool;
         private Coordinates[] lastChangedPixels = new Coordinates[3];
         private Coordinates[] lastChangedPixels = new Coordinates[3];
-        private List<Coordinates> confirmedPixels = new List<Coordinates>();
+        private readonly List<Coordinates> confirmedPixels = new List<Coordinates>();
         private byte changedPixelsindex = 0;
         private byte changedPixelsindex = 0;
 
 
         public PenTool()
         public PenTool()
@@ -50,10 +50,10 @@ namespace PixiEditor.Models.Tools.Tools
         {
         {
             Coordinates startingCords = coordinates.Length > 1 ? coordinates[1] : coordinates[0];
             Coordinates startingCords = coordinates.Length > 1 ? coordinates[1] : coordinates[0];
             BitmapPixelChanges pixels = Draw(
             BitmapPixelChanges pixels = Draw(
-                startingCords, 
-                coordinates[0], 
-                color, 
-                toolSizeSetting.Value, 
+                startingCords,
+                coordinates[0],
+                color,
+                toolSizeSetting.Value,
                 pixelPerfectSetting.Value,
                 pixelPerfectSetting.Value,
                 ViewModelMain.Current.BitmapManager.ActiveDocument.PreviewLayer);
                 ViewModelMain.Current.BitmapManager.ActiveDocument.PreviewLayer);
             return Only(pixels, layer);
             return Only(pixels, layer);

+ 2 - 2
PixiEditor/Properties/AssemblyInfo.cs

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

+ 1 - 1
PixiEditor/Views/UserControls/ToolSettingColorPicker.xaml

@@ -9,7 +9,7 @@
              d:Background="{StaticResource AccentColor}">
              d:Background="{StaticResource AccentColor}">
     <Grid>
     <Grid>
         <StackPanel Orientation="Horizontal">
         <StackPanel Orientation="Horizontal">
-            <colorpicker:PortableColorPicker x:Name="ColorPicker" SelectedColor="{Binding SelectedColor, ElementName=uc}"/>
+            <colorpicker:PortableColorPicker x:Name="ColorPicker" SelectedColor="{Binding SelectedColor, ElementName=uc,Mode=TwoWay}"/>
             <Button Command="{Binding CopyMainColorCommand, ElementName=uc}" Style="{StaticResource DarkRoundButton}" FontSize="12" Width="100" Margin="5,0,0,0">Copy Main Color</Button>
             <Button Command="{Binding CopyMainColorCommand, ElementName=uc}" Style="{StaticResource DarkRoundButton}" FontSize="12" Width="100" Margin="5,0,0,0">Copy Main Color</Button>
         </StackPanel>
         </StackPanel>
     </Grid>
     </Grid>