Eeschema gal: fix some redraw issues for bitmap images and worksheet.
After edition, the worksheet was not updated on screen. Bitmap images were not shown in opengl mode due to the fact all gal layers were cached.
This commit is contained in:
parent
7c960aa5fe
commit
61f2dd21b1
|
@ -108,8 +108,11 @@ void EDA_DRAW_FRAME::Process_PageSettings( wxCommandEvent& event )
|
|||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
if( m_canvas )
|
||||
m_canvas->Refresh();
|
||||
#ifdef EESCHEMA
|
||||
RedrawScreen( wxPoint( 0, 0 ), false );
|
||||
#else
|
||||
GetCanvas()->Refresh();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +237,6 @@ void DIALOG_PAGES_SETTINGS::OnOkClick( wxCommandEvent& event )
|
|||
if( SavePageSettings() )
|
||||
{
|
||||
m_screen->SetModify();
|
||||
m_parent->GetCanvas()->Refresh();
|
||||
|
||||
if( LocalPrjConfigChanged() )
|
||||
m_parent->SaveProjectSettings( false );
|
||||
|
|
|
@ -229,3 +229,10 @@ BITMAP_DEF SCH_BITMAP::GetMenuImage() const
|
|||
{
|
||||
return image_xpm;
|
||||
}
|
||||
|
||||
|
||||
void SCH_BITMAP::ViewGetLayers( int aLayers[], int& aCount ) const
|
||||
{
|
||||
aCount = 1;
|
||||
aLayers[0] = LAYER_WORKSHEET;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,10 @@ public:
|
|||
void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
|
||||
GR_DRAWMODE aDrawMode, COLOR4D aColor = COLOR4D::UNSPECIFIED ) override;
|
||||
|
||||
/**
|
||||
/// @copydoc VIEW_ITEM::ViewGetLayers()
|
||||
virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||
|
||||
/**
|
||||
* Reads and stores an image file. Init the bitmap used to draw this item
|
||||
* format.
|
||||
*
|
||||
|
|
|
@ -247,10 +247,19 @@ void SCH_DRAW_PANEL::setDefaultLayerDeps()
|
|||
for( int i = 0; i < KIGFX::VIEW::VIEW_MAX_LAYERS; i++ )
|
||||
m_view->SetLayerTarget( i, target );
|
||||
|
||||
m_view->SetLayerTarget( LAYER_GP_OVERLAY , KIGFX::TARGET_OVERLAY );
|
||||
// Bitmaps are draw on a non cached GAL layer:
|
||||
m_view->SetLayerTarget( LAYER_DRAW_BITMAPS , KIGFX::TARGET_NONCACHED );
|
||||
|
||||
// Some draw layers need specific settings
|
||||
m_view->SetLayerTarget( LAYER_GP_OVERLAY , KIGFX::TARGET_OVERLAY );
|
||||
m_view->SetLayerDisplayOnly( LAYER_GP_OVERLAY ) ;
|
||||
|
||||
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY , KIGFX::TARGET_OVERLAY );
|
||||
m_view->SetLayerDisplayOnly( LAYER_SELECT_OVERLAY ) ;
|
||||
|
||||
m_view->SetLayerTarget( LAYER_WORKSHEET , KIGFX::TARGET_NONCACHED );
|
||||
m_view->SetLayerDisplayOnly( LAYER_WORKSHEET ) ;
|
||||
|
||||
m_view->SetLayerDisplayOnly( LAYER_DRC );
|
||||
}
|
||||
|
||||
|
|
|
@ -197,6 +197,7 @@ enum GAL_LAYER_ID: int
|
|||
LAYER_PCB_BACKGROUND, ///< PCB background color
|
||||
LAYER_CURSOR, ///< PCB cursor
|
||||
LAYER_AUX_ITEMS, ///< Auxiliary items (guides, rule, etc)
|
||||
LAYER_DRAW_BITMAPS, ///< to handle and draw images bitmaps
|
||||
|
||||
/// This is the end of the layers used for visibility bitmasks in Pcbnew
|
||||
/// There can be at most 32 layers above here.
|
||||
|
|
Loading…
Reference in New Issue