Flags: remove unused IS_DRAGGING

This commit is contained in:
Mike Williams 2022-12-28 09:59:38 -05:00
parent 6cc17e4a16
commit 6816ee937a
4 changed files with 7 additions and 7 deletions

View File

@ -46,7 +46,7 @@ bool SELECTION_CONDITIONS::Empty( const SELECTION& aSelection )
bool SELECTION_CONDITIONS::Idle( const SELECTION& aSelection ) bool SELECTION_CONDITIONS::Idle( const SELECTION& aSelection )
{ {
constexpr int busyMask = ( IS_NEW | IS_PASTED | IS_MOVING | IS_DRAGGING ); constexpr int busyMask = ( IS_NEW | IS_PASTED | IS_MOVING );
return !aSelection.Front() || ( aSelection.Front()->GetEditFlags() & busyMask ) == 0; return !aSelection.Front() || ( aSelection.Front()->GetEditFlags() & busyMask ) == 0;
} }

View File

@ -48,7 +48,7 @@ std::vector<VECTOR2I> SCH_EDIT_FRAME::GetSchematicConnections()
for( SCH_ITEM* item : GetScreen()->Items() ) for( SCH_ITEM* item : GetScreen()->Items() )
{ {
// Avoid items that are changing // Avoid items that are changing
if( !( item->GetEditFlags() & ( IS_DRAGGING | IS_MOVING | IS_DELETED ) ) ) if( !( item->GetEditFlags() & ( IS_MOVING | IS_DELETED ) ) )
{ {
std::vector<VECTOR2I> pts = item->GetConnectionPoints(); std::vector<VECTOR2I> pts = item->GetConnectionPoints();
retval.insert( retval.end(), pts.begin(), pts.end() ); retval.insert( retval.end(), pts.begin(), pts.end() );
@ -102,7 +102,7 @@ bool SCH_EDIT_FRAME::TrimWire( const VECTOR2I& aStart, const VECTOR2I& aEnd )
for( SCH_LINE* line : wires ) for( SCH_LINE* line : wires )
{ {
// Don't remove wires that are already deleted or are currently being dragged // Don't remove wires that are already deleted or are currently being dragged
if( line->GetEditFlags() & ( STRUCT_DELETED | IS_DRAGGING | IS_MOVING | SKIP_STRUCT ) ) if( line->GetEditFlags() & ( STRUCT_DELETED | IS_MOVING | SKIP_STRUCT ) )
continue; continue;
if( !IsPointOnSegment( line->GetStartPoint(), line->GetEndPoint(), aStart ) || if( !IsPointOnSegment( line->GetStartPoint(), line->GetEndPoint(), aStart ) ||

View File

@ -102,7 +102,7 @@ public:
inline bool IsModified() const { return m_flags & IS_CHANGED; } inline bool IsModified() const { return m_flags & IS_CHANGED; }
inline bool IsNew() const { return m_flags & IS_NEW; } inline bool IsNew() const { return m_flags & IS_NEW; }
inline bool IsMoving() const { return m_flags & IS_MOVING; } inline bool IsMoving() const { return m_flags & IS_MOVING; }
inline bool IsDragging() const { return m_flags & IS_DRAGGING; }
inline bool IsSelected() const { return m_flags & SELECTED; } inline bool IsSelected() const { return m_flags & SELECTED; }
inline bool IsEntered() const { return m_flags & ENTERED; } inline bool IsEntered() const { return m_flags & ENTERED; }
inline bool IsBrightened() const { return m_flags & BRIGHTENED; } inline bool IsBrightened() const { return m_flags & BRIGHTENED; }
@ -144,8 +144,8 @@ public:
EDA_ITEM_FLAGS GetEditFlags() const EDA_ITEM_FLAGS GetEditFlags() const
{ {
constexpr int mask = ( IS_NEW | IS_PASTED | IS_MOVING | IS_DRAGGING | IS_BROKEN constexpr int mask =
| IS_CHANGED | STRUCT_DELETED ); ( IS_NEW | IS_PASTED | IS_MOVING | IS_BROKEN | IS_CHANGED | STRUCT_DELETED );
return m_flags & mask; return m_flags & mask;
} }

View File

@ -40,7 +40,7 @@
#define IS_MOVING (1 << 3) ///< Item being moved #define IS_MOVING (1 << 3) ///< Item being moved
#define IS_NEW (1 << 4) ///< New item, just created #define IS_NEW (1 << 4) ///< New item, just created
#define IS_BROKEN (1 << 5) ///< Is a segment just broken by BreakSegment #define IS_BROKEN (1 << 5) ///< Is a segment just broken by BreakSegment
#define IS_DRAGGING (1 << 6) ///< Item being dragged
#define IS_DELETED (1 << 7) #define IS_DELETED (1 << 7)
#define STARTPOINT (1 << 9) ///< When a line is selected, these flags indicate which #define STARTPOINT (1 << 9) ///< When a line is selected, these flags indicate which