diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 635954f0e1..1ec5c16285 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -893,7 +893,8 @@ int SCH_SCREEN::UpdatePickList() for( SCH_ITEM* item = m_drawList.begin(); item; item = item->Next() ) { // An item is picked if its bounding box intersects the reference area. - if( item->HitTest( area ) ) + if( item->HitTest( area ) && + ( !m_BlockLocate.IsDragging() || item->IsType( SCH_COLLECTOR::DraggableItems ) ) ) { picker.SetItem( item ); m_BlockLocate.PushItem( picker ); diff --git a/include/base_struct.h b/include/base_struct.h index 0de994f2c0..806e481b17 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -265,6 +265,23 @@ public: void ClearFlags( STATUS_FLAGS aMask = EDA_ITEM_ALL_FLAGS ) { m_Flags &= ~aMask; } STATUS_FLAGS GetFlags() const { return m_Flags; } + /** + * Function IsType + * Checks whether the item is one of the listed types + * @param aScanTypes List of item types + * @return true if the item type is contained in the list aScanTypes + */ + bool IsType( const KICAD_T aScanTypes[] ) + { + for( const KICAD_T* p = aScanTypes; *p != EOT; ++p ) + { + if( m_StructType == *p ) + return true; + } + + return false; + } + /** * Function SetForceVisible * is used to set and cleag force visible flag used to force the item to be drawn