From 139d356065498937a7fca624490341f7f98f42fd Mon Sep 17 00:00:00 2001
From: Alex Shvartzkop <dudesuchamazing@gmail.com>
Date: Tue, 28 May 2024 18:51:28 +0300
Subject: [PATCH] Fix scale factors of layer box selectors.

---
 gerbview/widgets/gbr_layer_box_selector.cpp | 2 +-
 pcbnew/pcb_layer_box_selector.cpp           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gerbview/widgets/gbr_layer_box_selector.cpp b/gerbview/widgets/gbr_layer_box_selector.cpp
index 8e00b0ffea..89471c7231 100644
--- a/gerbview/widgets/gbr_layer_box_selector.cpp
+++ b/gerbview/widgets/gbr_layer_box_selector.cpp
@@ -56,10 +56,10 @@ void GBR_LAYER_BOX_SELECTOR::Resync()
         for( int scale = 1; scale <= 3; scale++ )
         {
             wxBitmap bmp( size * scale, size * scale );
-            bmp.SetScaleFactor( scale );
 
             DrawColorSwatch( bmp, getLayerColor( LAYER_PCB_BACKGROUND ), getLayerColor( layerid ) );
 
+            bmp.SetScaleFactor( scale );
             bitmaps.push_back( bmp );
         }
 
diff --git a/pcbnew/pcb_layer_box_selector.cpp b/pcbnew/pcb_layer_box_selector.cpp
index 14ef392ca2..fd17b07292 100644
--- a/pcbnew/pcb_layer_box_selector.cpp
+++ b/pcbnew/pcb_layer_box_selector.cpp
@@ -63,10 +63,10 @@ void PCB_LAYER_BOX_SELECTOR::Resync()
         for( int scale = 1; scale <= 3; scale++ )
         {
             wxBitmap bmp( size * scale, size * scale );
-            bmp.SetScaleFactor( scale );
 
             DrawColorSwatch( bmp, getLayerColor( LAYER_PCB_BACKGROUND ), getLayerColor( layerid ) );
 
+            bmp.SetScaleFactor( scale );
             bitmaps.push_back( bmp );
         }