Eeschema, Modedit: void fields (mainly the footprint field) now cannot be selected when click on them.
This commit is contained in:
parent
5bab73d638
commit
aec75256c9
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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…
Reference in New Issue