GerbView: fix saving of canvas type and lingering legacy menu item
Fixes: lp:1829647
* https://bugs.launchpad.net/kicad/+bug/1829647
(cherry picked from commit b00e20b23f
)
This commit is contained in:
parent
9d56102210
commit
ec39bdda77
|
@ -1255,14 +1255,14 @@ bool EDA_DRAW_FRAME::saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas
|
|||
// a parent frame)
|
||||
FRAME_T allowed_frames[] =
|
||||
{
|
||||
FRAME_SCH, FRAME_PCB, FRAME_PCB_MODULE_EDITOR
|
||||
FRAME_SCH, FRAME_PCB, FRAME_PCB_MODULE_EDITOR, FRAME_GERBER
|
||||
};
|
||||
|
||||
bool allow_save = false;
|
||||
|
||||
for( int ii = 0; ii < 3; ii++ )
|
||||
for( FRAME_T frame : allowed_frames )
|
||||
{
|
||||
if( m_Ident == allowed_frames[ii] )
|
||||
if( m_Ident == frame )
|
||||
{
|
||||
allow_save = true;
|
||||
break;
|
||||
|
|
|
@ -435,14 +435,10 @@ void GERBVIEW_FRAME::OnUpdateSwitchCanvas( wxUpdateUIEvent& aEvent )
|
|||
{
|
||||
wxMenuBar* menuBar = GetMenuBar();
|
||||
EDA_DRAW_PANEL_GAL* gal_canvas = GetGalCanvas();
|
||||
EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE;
|
||||
|
||||
if( IsGalCanvasActive() && gal_canvas )
|
||||
canvasType = gal_canvas->GetBackend();
|
||||
EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = gal_canvas->GetBackend();
|
||||
|
||||
struct { int menuId; int galType; } menuList[] =
|
||||
{
|
||||
{ ID_MENU_CANVAS_LEGACY, EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE },
|
||||
{ ID_MENU_CANVAS_OPENGL, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL },
|
||||
{ ID_MENU_CANVAS_CAIRO, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO },
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue