diff --git a/pcbnew/board_commit.cpp b/pcbnew/board_commit.cpp index 23e882fd68..c50a9ce6c1 100644 --- a/pcbnew/board_commit.cpp +++ b/pcbnew/board_commit.cpp @@ -279,7 +279,9 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry ) if( TOOL_MANAGER* toolMgr = frame->GetToolManager() ) toolMgr->PostEvent( { TC_MESSAGE, TA_MODEL_CHANGE, AS_GLOBAL } ); - connectivity->RecalculateRatsnest(); + if ( !m_editModules ) + connectivity->RecalculateRatsnest(); + frame->OnModify(); frame->UpdateMsgPanel(); @@ -377,7 +379,8 @@ void BOARD_COMMIT::Revert() } } - connectivity->RecalculateRatsnest(); + if ( !m_editModules ) + connectivity->RecalculateRatsnest(); clear(); } diff --git a/pcbnew/undo_redo.cpp b/pcbnew/undo_redo.cpp index 615224f9d2..eef6d69e38 100644 --- a/pcbnew/undo_redo.cpp +++ b/pcbnew/undo_redo.cpp @@ -556,7 +556,8 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool wxMessageBox( wxT( "Incomplete undo/redo operation: some items not found" ) ); // Rebuild pointers and connectivity that can be changed. - if( reBuild_ratsnest || deep_reBuild_ratsnest ) + // connectivity can be rebuilt only in the board editor frame + if( IsType( FRAME_PCB ) && ( reBuild_ratsnest || deep_reBuild_ratsnest ) ) { Compile_Ratsnest( NULL, false ); }