Gerbview, Legacy graphic mode: fix missing or incorrect inits related to zoom.
Fixes #6326 https://gitlab.com/kicad/code/kicad/issues/6326
This commit is contained in:
parent
4497a754fb
commit
51708bab49
|
@ -57,6 +57,8 @@ void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
Erase_Current_DrawLayer( false );
|
Erase_Current_DrawLayer( false );
|
||||||
LoadGerberFiles( fn );
|
LoadGerberFiles( fn );
|
||||||
|
Zoom_Automatique( false );
|
||||||
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,6 +73,8 @@ void GERBVIEW_FRAME::OnDrlFileHistory( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
Erase_Current_DrawLayer( false );
|
Erase_Current_DrawLayer( false );
|
||||||
LoadExcellonFiles( fn );
|
LoadExcellonFiles( fn );
|
||||||
|
Zoom_Automatique( false );
|
||||||
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,6 +88,8 @@ void GERBVIEW_FRAME::OnZipFileHistory( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
Erase_Current_DrawLayer( false );
|
Erase_Current_DrawLayer( false );
|
||||||
LoadZipArchiveFile( filename );
|
LoadZipArchiveFile( filename );
|
||||||
|
Zoom_Automatique( false );
|
||||||
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +99,11 @@ void GERBVIEW_FRAME::OnJobFileHistory( wxCommandEvent& event )
|
||||||
wxString filename = GetFileFromHistory( event.GetId(), _( "Job files" ), &m_jobFileHistory );
|
wxString filename = GetFileFromHistory( event.GetId(), _( "Job files" ), &m_jobFileHistory );
|
||||||
|
|
||||||
if( !filename.IsEmpty() )
|
if( !filename.IsEmpty() )
|
||||||
|
{
|
||||||
LoadGerberJobFile( filename );
|
LoadGerberJobFile( filename );
|
||||||
|
Zoom_Automatique( false );
|
||||||
|
m_canvas->Refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,6 +116,8 @@ void GERBVIEW_FRAME::Files_io( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
case wxID_FILE:
|
case wxID_FILE:
|
||||||
LoadGerberFiles( wxEmptyString );
|
LoadGerberFiles( wxEmptyString );
|
||||||
|
Zoom_Automatique( false );
|
||||||
|
m_canvas->Refresh();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_GERBVIEW_ERASE_ALL:
|
case ID_GERBVIEW_ERASE_ALL:
|
||||||
|
@ -148,21 +160,26 @@ void GERBVIEW_FRAME::Files_io( wxCommandEvent& event )
|
||||||
// Load the layers from stored paths
|
// Load the layers from stored paths
|
||||||
wxBusyCursor wait;
|
wxBusyCursor wait;
|
||||||
loadListOfGerberAndDrillFiles( wxEmptyString, listOfGerberFiles, &fileType );
|
loadListOfGerberAndDrillFiles( wxEmptyString, listOfGerberFiles, &fileType );
|
||||||
|
Zoom_Automatique( false );
|
||||||
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_GERBVIEW_LOAD_DRILL_FILE:
|
case ID_GERBVIEW_LOAD_DRILL_FILE:
|
||||||
LoadExcellonFiles( wxEmptyString );
|
LoadExcellonFiles( wxEmptyString );
|
||||||
|
Zoom_Automatique( false );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_GERBVIEW_LOAD_ZIP_ARCHIVE_FILE:
|
case ID_GERBVIEW_LOAD_ZIP_ARCHIVE_FILE:
|
||||||
LoadZipArchiveFile( wxEmptyString );
|
LoadZipArchiveFile( wxEmptyString );
|
||||||
|
Zoom_Automatique( false );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_GERBVIEW_LOAD_JOB_FILE:
|
case ID_GERBVIEW_LOAD_JOB_FILE:
|
||||||
LoadGerberJobFile( wxEmptyString );
|
LoadGerberJobFile( wxEmptyString );
|
||||||
|
Zoom_Automatique( false );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -373,8 +390,6 @@ bool GERBVIEW_FRAME::loadListOfGerberAndDrillFiles( const wxString& aPath,
|
||||||
|
|
||||||
SetVisibleLayers( visibility );
|
SetVisibleLayers( visibility );
|
||||||
|
|
||||||
Zoom_Automatique( false );
|
|
||||||
|
|
||||||
// Synchronize layers tools with actual active layer:
|
// Synchronize layers tools with actual active layer:
|
||||||
ReFillLayerWidget();
|
ReFillLayerWidget();
|
||||||
|
|
||||||
|
@ -700,8 +715,6 @@ bool GERBVIEW_FRAME::LoadZipArchiveFile( const wxString& aFullFileName )
|
||||||
if( filename.IsOk() )
|
if( filename.IsOk() )
|
||||||
unarchiveFiles( filename.GetFullPath(), &reporter );
|
unarchiveFiles( filename.GetFullPath(), &reporter );
|
||||||
|
|
||||||
Zoom_Automatique( false );
|
|
||||||
|
|
||||||
// Synchronize layers tools with actual active layer:
|
// Synchronize layers tools with actual active layer:
|
||||||
ReFillLayerWidget();
|
ReFillLayerWidget();
|
||||||
SetActiveLayer( GetActiveLayer() );
|
SetActiveLayer( GetActiveLayer() );
|
||||||
|
|
|
@ -222,6 +222,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
UseGalCanvas( false );
|
||||||
m_colorsSettings->SetLegacyMode( true );
|
m_colorsSettings->SetLegacyMode( true );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue