Browse Source

Eeschema, Modedit: void fields (mainly the footprint field) now cannot be selected when click on them.

pull/1/head
jean-pierre charras 15 years ago
parent
commit
aec75256c9
  1. 5
      eeschema/lib_field.cpp
  2. 9
      eeschema/lib_field.h

5
eeschema/lib_field.cpp

@ -350,6 +350,11 @@ void LIB_FIELD::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint&
bool LIB_FIELD::HitTest( const wxPoint& aPosition )
{
// Because HitTest is mainly used to select the field
// return always false if this field is void
if( IsVoid() )
return false;
return HitTest( aPosition, 0, DefaultTransform );
}

9
eeschema/lib_field.h

@ -106,6 +106,15 @@ public:
void SetFields( const std::vector <LIB_FIELD> aFields );
/**
* Function IsVoid
* @return true if the field value is void (no text in this field)
*/
bool IsVoid()
{
return m_Text.IsEmpty();
}
/**
* Function IsVisible
* @return true is this field is visible, false if flagged invisible

Loading…
Cancel
Save