eeschema: Avoid modifying the schematic in undo
OnModify() is called when staging the undo/redo modifications. This requires that it not create changes that themselves need to be placed in the undo/redo stack
This commit is contained in:
parent
2529346940
commit
94470f7da6
|
@ -798,7 +798,7 @@ void SCH_EDIT_FRAME::OnModify()
|
|||
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_realTimeConnectivity )
|
||||
RecalculateConnections();
|
||||
RecalculateConnections( false );
|
||||
|
||||
m_canvas->Refresh();
|
||||
}
|
||||
|
@ -1476,15 +1476,18 @@ void SCH_EDIT_FRAME::UpdateTitle()
|
|||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::RecalculateConnections()
|
||||
void SCH_EDIT_FRAME::RecalculateConnections( bool aDoCleanup )
|
||||
{
|
||||
SCH_SHEET_LIST list( g_RootSheet );
|
||||
|
||||
PROF_COUNTER timer;
|
||||
|
||||
// Ensure schematic graph is accurate
|
||||
if( aDoCleanup )
|
||||
{
|
||||
for( const auto& sheet : list )
|
||||
SchematicCleanUp( false, sheet.LastScreen() );
|
||||
}
|
||||
|
||||
timer.Stop();
|
||||
wxLogTrace( "CONN_PROFILE", "SchematicCleanUp() %0.4f ms", timer.msecs() );
|
||||
|
|
|
@ -517,7 +517,7 @@ public:
|
|||
* @param aScreen is the screen to examine, or nullptr to examine the current screen
|
||||
* @return True if any wires or buses were broken.
|
||||
*/
|
||||
bool BreakSegmentsOnJunctions( bool aApped = false,
|
||||
bool BreakSegmentsOnJunctions( bool aAppend = false,
|
||||
SCH_SCREEN* aScreen = nullptr );
|
||||
|
||||
/**
|
||||
|
@ -1557,7 +1557,7 @@ public:
|
|||
/**
|
||||
* Generates the connection data for the entire schematic hierarchy.
|
||||
*/
|
||||
void RecalculateConnections();
|
||||
void RecalculateConnections( bool aDoCleanup = true );
|
||||
|
||||
void SetCurrentSheet( SCH_SHEET_PATH *aSheet );
|
||||
|
||||
|
|
Loading…
Reference in New Issue