Browse Source

Schematic: remove IS_RESIZING

Is unused/redundant with IS_MOVING
7.0
Mike Williams 3 years ago
parent
commit
f03fd5ad2d
  1. 2
      common/tool/selection_conditions.cpp
  2. 4
      eeschema/sch_screen.cpp
  3. 2
      eeschema/tools/sch_drawing_tools.cpp
  4. 3
      include/eda_item.h
  5. 2
      include/eda_item_flags.h

2
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;
}

4
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 )

2
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 );

3
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;

2
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)

Loading…
Cancel
Save