From f03fd5ad2df0ebb5b5240cf954967fe088180dac Mon Sep 17 00:00:00 2001
From: Mike Williams <mike@mikebwilliams.com>
Date: Wed, 28 Dec 2022 09:49:15 -0500
Subject: [PATCH] Schematic: remove IS_RESIZING

Is unused/redundant with IS_MOVING
---
 common/tool/selection_conditions.cpp | 2 +-
 eeschema/sch_screen.cpp              | 4 ++--
 eeschema/tools/sch_drawing_tools.cpp | 2 +-
 include/eda_item.h                   | 3 +--
 include/eda_item_flags.h             | 2 +-
 5 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/common/tool/selection_conditions.cpp b/common/tool/selection_conditions.cpp
index e24976525b..61e29ad2ec 100644
--- a/common/tool/selection_conditions.cpp
+++ b/common/tool/selection_conditions.cpp
@@ -46,7 +46,7 @@ bool SELECTION_CONDITIONS::Empty( const SELECTION& aSelection )
 
 bool SELECTION_CONDITIONS::Idle( const SELECTION& aSelection )
 {
-    constexpr int busyMask = ( IS_NEW | IS_PASTED | IS_MOVING | IS_RESIZING | IS_DRAGGING );
+    constexpr int busyMask = ( IS_NEW | IS_PASTED | IS_MOVING | IS_DRAGGING );
 
     return !aSelection.Front() || ( aSelection.Front()->GetEditFlags() & busyMask ) == 0;
 }
diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp
index e9e0d30f0d..2e5bae6442 100644
--- a/eeschema/sch_screen.cpp
+++ b/eeschema/sch_screen.cpp
@@ -1040,7 +1040,7 @@ void SCH_SCREEN::Print( const RENDER_SETTINGS* aSettings )
 
     for( SCH_ITEM* item : Items() )
     {
-        if( item->IsMoving() || item->IsResized() )
+        if( item->IsMoving() )
             continue;
 
         if( item->Type() == SCH_JUNCTION_T )
@@ -1085,7 +1085,7 @@ void SCH_SCREEN::Plot( PLOTTER* aPlotter ) const
 
     for( SCH_ITEM* item : Items() )
     {
-        if( item->IsMoving() || item->IsResized() )
+        if( item->IsMoving() )
             continue;
 
         if( item->Type() == SCH_JUNCTION_T )
diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp
index 15c9a9dd65..5cd8c2fb51 100644
--- a/eeschema/tools/sch_drawing_tools.cpp
+++ b/eeschema/tools/sch_drawing_tools.cpp
@@ -1813,7 +1813,7 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent )
             m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
 
             sheet = new SCH_SHEET( m_frame->GetCurrentSheet().Last(), cursorPos );
-            sheet->SetFlags( IS_NEW | IS_RESIZING );
+            sheet->SetFlags( IS_NEW | IS_MOVING );
             sheet->SetScreen( nullptr );
             sheet->SetBorderWidth( schIUScale.MilsToIU( cfg->m_Drawing.default_line_thickness ) );
             sheet->SetBorderColor( cfg->m_Drawing.default_sheet_border_color );
diff --git a/include/eda_item.h b/include/eda_item.h
index 60c707068b..b3297a13e0 100644
--- a/include/eda_item.h
+++ b/include/eda_item.h
@@ -105,7 +105,6 @@ public:
     inline bool IsDragging() const { return m_flags & IS_DRAGGING; }
     inline bool IsSelected() const { return m_flags & SELECTED; }
     inline bool IsEntered() const { return m_flags & ENTERED; }
-    inline bool IsResized() const { return m_flags & IS_RESIZING; }
     inline bool IsBrightened() const { return m_flags & BRIGHTENED; }
 
     inline bool IsRollover() const
@@ -145,7 +144,7 @@ public:
 
     EDA_ITEM_FLAGS GetEditFlags() const
     {
-        constexpr int mask = ( IS_NEW | IS_PASTED | IS_MOVING | IS_RESIZING | IS_DRAGGING
+        constexpr int mask = ( IS_NEW | IS_PASTED | IS_MOVING | IS_DRAGGING
                                | IS_CHANGED | STRUCT_DELETED );
 
         return m_flags & mask;
diff --git a/include/eda_item_flags.h b/include/eda_item_flags.h
index 2db1fcf2bc..e921027bc4 100644
--- a/include/eda_item_flags.h
+++ b/include/eda_item_flags.h
@@ -39,7 +39,7 @@
 #define IN_EDIT        (1 << 2)    ///< Item currently edited
 #define IS_MOVING      (1 << 3)    ///< Item being moved
 #define IS_NEW         (1 << 4)    ///< New item, just created
-#define IS_RESIZING    (1 << 5)    ///< Item being resized
+
 #define IS_DRAGGING    (1 << 6)    ///< Item being dragged
 #define IS_DELETED     (1 << 7)