Eeschema: fix not deletable bitmap issue (missing SCH_BITMAP in deletable list).

Also display bitmap info in message panel.

Fixes: lp:1835125
https://bugs.launchpad.net/kicad/+bug/1835125
This commit is contained in:
jean-pierre charras 2019-07-05 10:25:23 +02:00
parent becd6a6f9d
commit fffb0d340f
3 changed files with 13 additions and 0 deletions

View File

@ -31,6 +31,7 @@
#include <trigo.h>
#include <macros.h>
#include <bitmaps.h>
#include <base_units.h>
#include <sch_bitmap.h>
@ -192,6 +193,15 @@ BITMAP_DEF SCH_BITMAP::GetMenuImage() const
}
void SCH_BITMAP::GetMsgPanelInfo( EDA_UNITS_T aUnits, MSG_PANEL_ITEMS& aList )
{
aList.push_back( MSG_PANEL_ITEM( _( "Bitmap" ), wxEmptyString, RED ) );
aList.push_back( MSG_PANEL_ITEM( _( "Width" ), MessageTextFromValue( aUnits, GetSize().x ), RED ) );
aList.push_back( MSG_PANEL_ITEM( _( "Height" ), MessageTextFromValue( aUnits, GetSize().y ), RED ) );
}
void SCH_BITMAP::ViewGetLayers( int aLayers[], int& aCount ) const
{
aCount = 1;

View File

@ -130,6 +130,8 @@ public:
BITMAP_DEF GetMenuImage() const override;
void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM >& aList ) override;
wxPoint GetPosition() const override { return m_pos; }
void SetPosition( const wxPoint& aPosition ) override { m_pos = aPosition; }

View File

@ -874,6 +874,7 @@ static KICAD_T deletableItems[] =
SCH_SHEET_T,
SCH_SHEET_PIN_T,
SCH_COMPONENT_T,
SCH_BITMAP_T,
EOT
};