Loading common/zoom.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,11 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe */ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) { GetScreen()->SetZoom( BestZoom() ); // Set the best zoom and get center point. RedrawScreen( GetScreen()->GetScrollCenterPosition(), aWarpPointer ); BASE_SCREEN * screen = GetScreen(); screen->SetZoom( BestZoom() ); // Set the best zoom and get center point. if( screen->m_FirstRedraw ) screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); } Loading eeschema/files-io.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ /***************************************************************************** * Routine to save an EESchema file. * * FileSave controls how the file is to be saved - under what name. * * Returns TRUE if the file has been saved. * * Returns true if the file has been saved. * *****************************************************************************/ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* screen, int FileSave ) { Loading Loading @@ -212,8 +212,8 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) screen->m_Commentaire2.Empty(); screen->m_Commentaire3.Empty(); screen->m_Commentaire4.Empty(); LoadProjectFile( wxEmptyString, TRUE ); Zoom_Automatique( TRUE ); LoadProjectFile( wxEmptyString, true ); Zoom_Automatique( false ); SetSheetNumberAndCount(); DrawPanel->Refresh(); return true; Loading @@ -223,7 +223,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) msg = _( "Ready\nWorking dir: \n" ) + wxGetCwd(); PrintMsg( msg ); LoadProjectFile( wxEmptyString, FALSE ); LoadProjectFile( wxEmptyString, false ); // Clear (if needed) the current active library in libedit because it could be // removed from memory Loading Loading @@ -292,7 +292,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) if( !wxFileExists( g_RootSheet->GetScreen()->GetFileName() ) && !LibCacheExist ) { Zoom_Automatique( FALSE ); Zoom_Automatique( false ); msg.Printf( _( "File <%s> not found." ), GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); DisplayInfoMessage( this, msg, 0 ); Loading @@ -306,7 +306,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) /* Redraw base screen (ROOT) if necessary. */ GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); Zoom_Automatique( FALSE ); Zoom_Automatique( false ); SetSheetNumberAndCount(); DrawPanel->Refresh( true ); return diag; Loading eeschema/hierarch.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -263,12 +263,22 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet() if( screen->m_FirstRedraw ) { Zoom_Automatique( false ); screen->m_FirstRedraw = false; Zoom_Automatique( true ); screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); DrawPanel->MoveCursorToCrossHair(); } else { DrawPanel->MoveCursorToCrossHair(); RedrawScreen( screen->GetScrollCenterPosition(), true ); } // Now refresh DrawPanel. Should be not necessary, but because screen has changed // the previous refresh has set all new draw parameters (scroll position ..) // but most of time there were some inconsitencies about cursor parameters // ( previous position of cursor ...) and artefacts can happen // mainly when sheet size has changed // This second refresh clears artefacts because at this point, // all parameters are now updated DrawPanel->Refresh(); } gerbview/files.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ bool WinEDA_GerberFrame::LoadGerberFiles( const wxString& aFullFileName ) } } Zoom_Automatique( true ); Zoom_Automatique( false ); g_SaveTime = time( NULL ); // Synchronize layers tools with actual active layer: Loading gerbview/gerbview.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -122,8 +122,9 @@ bool WinEDA_App::OnInit() // meaning here SetTopWindow( frame ); // Set GerbView mainframe on top frame->Show( TRUE ); // Show GerbView mainframe frame->Zoom_Automatique( TRUE ); // Zoomfit drawing in frame frame->Show( true ); // Show GerbView mainframe frame->Zoom_Automatique( true ); // Zoom fit in frame frame->GetScreen()->m_FirstRedraw = false; Read_Config(); Loading Loading
common/zoom.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,11 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe */ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) { GetScreen()->SetZoom( BestZoom() ); // Set the best zoom and get center point. RedrawScreen( GetScreen()->GetScrollCenterPosition(), aWarpPointer ); BASE_SCREEN * screen = GetScreen(); screen->SetZoom( BestZoom() ); // Set the best zoom and get center point. if( screen->m_FirstRedraw ) screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); } Loading
eeschema/files-io.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ /***************************************************************************** * Routine to save an EESchema file. * * FileSave controls how the file is to be saved - under what name. * * Returns TRUE if the file has been saved. * * Returns true if the file has been saved. * *****************************************************************************/ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* screen, int FileSave ) { Loading Loading @@ -212,8 +212,8 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) screen->m_Commentaire2.Empty(); screen->m_Commentaire3.Empty(); screen->m_Commentaire4.Empty(); LoadProjectFile( wxEmptyString, TRUE ); Zoom_Automatique( TRUE ); LoadProjectFile( wxEmptyString, true ); Zoom_Automatique( false ); SetSheetNumberAndCount(); DrawPanel->Refresh(); return true; Loading @@ -223,7 +223,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) msg = _( "Ready\nWorking dir: \n" ) + wxGetCwd(); PrintMsg( msg ); LoadProjectFile( wxEmptyString, FALSE ); LoadProjectFile( wxEmptyString, false ); // Clear (if needed) the current active library in libedit because it could be // removed from memory Loading Loading @@ -292,7 +292,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) if( !wxFileExists( g_RootSheet->GetScreen()->GetFileName() ) && !LibCacheExist ) { Zoom_Automatique( FALSE ); Zoom_Automatique( false ); msg.Printf( _( "File <%s> not found." ), GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); DisplayInfoMessage( this, msg, 0 ); Loading @@ -306,7 +306,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) /* Redraw base screen (ROOT) if necessary. */ GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId ); Zoom_Automatique( FALSE ); Zoom_Automatique( false ); SetSheetNumberAndCount(); DrawPanel->Refresh( true ); return diag; Loading
eeschema/hierarch.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -263,12 +263,22 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet() if( screen->m_FirstRedraw ) { Zoom_Automatique( false ); screen->m_FirstRedraw = false; Zoom_Automatique( true ); screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); DrawPanel->MoveCursorToCrossHair(); } else { DrawPanel->MoveCursorToCrossHair(); RedrawScreen( screen->GetScrollCenterPosition(), true ); } // Now refresh DrawPanel. Should be not necessary, but because screen has changed // the previous refresh has set all new draw parameters (scroll position ..) // but most of time there were some inconsitencies about cursor parameters // ( previous position of cursor ...) and artefacts can happen // mainly when sheet size has changed // This second refresh clears artefacts because at this point, // all parameters are now updated DrawPanel->Refresh(); }
gerbview/files.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ bool WinEDA_GerberFrame::LoadGerberFiles( const wxString& aFullFileName ) } } Zoom_Automatique( true ); Zoom_Automatique( false ); g_SaveTime = time( NULL ); // Synchronize layers tools with actual active layer: Loading
gerbview/gerbview.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -122,8 +122,9 @@ bool WinEDA_App::OnInit() // meaning here SetTopWindow( frame ); // Set GerbView mainframe on top frame->Show( TRUE ); // Show GerbView mainframe frame->Zoom_Automatique( TRUE ); // Zoomfit drawing in frame frame->Show( true ); // Show GerbView mainframe frame->Zoom_Automatique( true ); // Zoom fit in frame frame->GetScreen()->m_FirstRedraw = false; Read_Config(); Loading