Commit aec75256 authored by jean-pierre charras's avatar jean-pierre charras

Eeschema, Modedit: void fields (mainly the footprint field) now cannot be...

Eeschema, Modedit: void fields (mainly the footprint field) now cannot be selected when click on them.
parent 5bab73d6
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment