Go back to event-loop zooming for new frames.
The immediate mode appears to have made things worse not better.
This commit is contained in:
parent
4e11dcfa31
commit
1ea001d497
|
@ -65,7 +65,7 @@ DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES( SCH_EDIT_FRAME* aParent ) :
|
||||||
loadGraphData();
|
loadGraphData();
|
||||||
updateUi();
|
updateUi();
|
||||||
|
|
||||||
aParent->GetToolManager()->RunAction( "common.Control.zoomFitScreen", true );
|
aParent->GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#include <dialog_migrate_buses.h>
|
#include <dialog_migrate_buses.h>
|
||||||
#include <ws_data_model.h>
|
#include <ws_data_model.h>
|
||||||
#include <connection_graph.h>
|
#include <connection_graph.h>
|
||||||
|
#include <tool/actions.h>
|
||||||
|
|
||||||
bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, bool aSaveUnderNewName,
|
bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, bool aSaveUnderNewName,
|
||||||
bool aCreateBackupFile )
|
bool aCreateBackupFile )
|
||||||
|
@ -309,7 +309,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||||
// Do not leave g_RootSheet == NULL because it is expected to be
|
// Do not leave g_RootSheet == NULL because it is expected to be
|
||||||
// a valid sheet. Therefore create a dummy empty root sheet and screen.
|
// a valid sheet. Therefore create a dummy empty root sheet and screen.
|
||||||
CreateScreens();
|
CreateScreens();
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
|
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Error loading schematic file \"%s\".\n%s" ),
|
msg.Printf( _( "Error loading schematic file \"%s\".\n%s" ),
|
||||||
|
@ -382,7 +382,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||||
}
|
}
|
||||||
|
|
||||||
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
SyncView();
|
SyncView();
|
||||||
GetScreen()->ClearDrawingState();
|
GetScreen()->ClearDrawingState();
|
||||||
|
@ -645,7 +645,7 @@ bool SCH_EDIT_FRAME::AppendSchematic()
|
||||||
screens.TestDanglingEnds();
|
screens.TestDanglingEnds();
|
||||||
|
|
||||||
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
|
|
||||||
SyncView();
|
SyncView();
|
||||||
|
@ -868,7 +868,7 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
|
||||||
RecalculateConnections();
|
RecalculateConnections();
|
||||||
|
|
||||||
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
SyncView();
|
SyncView();
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
|
@ -878,7 +878,7 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
|
||||||
// Do not leave g_RootSheet == NULL because it is expected to be
|
// Do not leave g_RootSheet == NULL because it is expected to be
|
||||||
// a valid sheet. Therefore create a dummy empty root sheet and screen.
|
// a valid sheet. Therefore create a dummy empty root sheet and screen.
|
||||||
CreateScreens();
|
CreateScreens();
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
|
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "Error loading schematic \"%s\".\n%s" ), aFileName, ioe.What() );
|
msg.Printf( _( "Error loading schematic \"%s\".\n%s" ), aFileName, ioe.What() );
|
||||||
|
|
|
@ -273,7 +273,7 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||||
|
|
||||||
if( !screen->m_Initialized )
|
if( !screen->m_Initialized )
|
||||||
{
|
{
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
screen->m_Initialized = true;
|
screen->m_Initialized = true;
|
||||||
screen->ClearUndoORRedoList( screen->m_UndoList, 1 );
|
screen->ClearUndoORRedoList( screen->m_UndoList, 1 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
Raise();
|
Raise();
|
||||||
Show( true );
|
Show( true );
|
||||||
|
|
||||||
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, false );
|
||||||
|
|
||||||
SyncView();
|
SyncView();
|
||||||
GetGalCanvas()->GetViewControls()->SetSnapping( true );
|
GetGalCanvas()->GetViewControls()->SetSnapping( true );
|
||||||
|
@ -760,7 +760,7 @@ void LIB_EDIT_FRAME::emptyScreen()
|
||||||
SetCurPart( nullptr );
|
SetCurPart( nullptr );
|
||||||
SetScreen( m_dummyScreen );
|
SetScreen( m_dummyScreen );
|
||||||
m_dummyScreen->ClearUndoRedoList();
|
m_dummyScreen->ClearUndoRedoList();
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ bool LIB_EDIT_FRAME::LoadComponentFromCurrentLib( const wxString& aAliasName, in
|
||||||
m_SyncPinEdit = !GetCurPart()->UnitsLocked();
|
m_SyncPinEdit = !GetCurPart()->UnitsLocked();
|
||||||
|
|
||||||
GetScreen()->ClearUndoRedoList();
|
GetScreen()->ClearUndoRedoList();
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
SetShowDeMorgan( GetCurPart()->HasConversion() );
|
SetShowDeMorgan( GetCurPart()->HasConversion() );
|
||||||
|
|
||||||
if( aUnit > 0 )
|
if( aUnit > 0 )
|
||||||
|
@ -254,7 +254,7 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, const wxString& a
|
||||||
SetCurPart( new LIB_PART( *lib_part ) );
|
SetCurPart( new LIB_PART( *lib_part ) );
|
||||||
SetCurLib( aLibrary );
|
SetCurLib( aLibrary );
|
||||||
|
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
updateTitle();
|
updateTitle();
|
||||||
RebuildSymbolUnitsList();
|
RebuildSymbolUnitsList();
|
||||||
SetShowDeMorgan( GetCurPart()->HasConversion() );
|
SetShowDeMorgan( GetCurPart()->HasConversion() );
|
||||||
|
|
|
@ -307,7 +307,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
||||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false );
|
||||||
|
|
||||||
if( GetGalCanvas() )
|
if( GetGalCanvas() )
|
||||||
GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
|
GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
|
||||||
|
|
|
@ -189,8 +189,8 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
||||||
|
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
GetToolManager()->RunAction( "common.Control.gridPreset", true, m_LastGridSizeId );
|
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
||||||
GetToolManager()->RunAction( "common.Control.zoomFitScreen", true );
|
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false );
|
||||||
|
|
||||||
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
|
if( !IsModal() ) // For modal mode, calling ShowModal() will show this frame
|
||||||
{
|
{
|
||||||
|
@ -642,7 +642,7 @@ void LIB_VIEW_FRAME::SetSelectedComponent( const wxString& aComponentName )
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePreviewSymbol();
|
updatePreviewSymbol();
|
||||||
m_toolManager->RunAction( "common.Control.zoomFitScreen", true );
|
m_toolManager->RunAction( ACTIONS::zoomFitScreen, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
SetActiveLayer( 0, true );
|
SetActiveLayer( 0, true );
|
||||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false );
|
||||||
|
|
||||||
EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = LoadCanvasTypeSetting();
|
EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = LoadCanvasTypeSetting();
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||||
|
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
||||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false );
|
||||||
updateTitle();
|
updateTitle();
|
||||||
|
|
||||||
Raise(); // On some window managers, this is needed
|
Raise(); // On some window managers, this is needed
|
||||||
|
|
|
@ -227,7 +227,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, wxWindow* aParent
|
||||||
updateView();
|
updateView();
|
||||||
|
|
||||||
SetActiveLayer( F_Cu );
|
SetActiveLayer( F_Cu );
|
||||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false );
|
||||||
|
|
||||||
// Do not Run a dialog here: on some Window Managers, it creates issues.
|
// Do not Run a dialog here: on some Window Managers, it creates issues.
|
||||||
// Reason: the FOOTPRINT_WIZARD_FRAME is run as modal;
|
// Reason: the FOOTPRINT_WIZARD_FRAME is run as modal;
|
||||||
|
|
|
@ -301,7 +301,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
|
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
GetToolManager()->RunAction( ACTIONS::gridPreset, true, m_LastGridSizeId );
|
||||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false );
|
||||||
|
|
||||||
m_canvasType = LoadCanvasTypeSetting();
|
m_canvasType = LoadCanvasTypeSetting();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue