diff --git a/common/kiway.cpp b/common/kiway.cpp index 72e31aad3e..6031fe7bfa 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -316,7 +316,15 @@ bool KIWAY::ProcessEvent( wxEvent& aEvent ) KIWAY_PLAYER* alive = Player( dest, false ); if( alive ) + { +#if 0 + // This is still broken, but is the way to go. return alive->ProcessEvent( aEvent ); +#else + alive->KiwayMailIn( *mail ); + return true; +#endif + } } return false; diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 0bc51934ab..102b3ff18f 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -180,3 +180,15 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aComponent, SCH_COMPONENT* a } } } + + +#include + +void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) +{ + // @todo switch on command type + std::string payload = mail.GetPayload(); + + ExecuteRemoteCommand( payload.c_str() ); +} + diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 62aec927da..fe38369fd4 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -1073,3 +1073,4 @@ void SCH_EDIT_FRAME::UpdateTitle() SetTitle( title ); } + diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 5f22c1fab7..fea2499c69 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -368,6 +368,8 @@ public: */ virtual void ExecuteRemoteCommand( const char* cmdline ); + void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // virtual overload from KIWAY_PLAYER + void OnLeftClick( wxDC* aDC, const wxPoint& aPosition ); void OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ); bool OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 6498d7f0f3..70cefc2a36 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -239,6 +239,8 @@ public: */ virtual void ExecuteRemoteCommand( const char* cmdline ); + void KiwayMailIn( KIWAY_EXPRESS& aEvent ); // virtual overload from KIWAY_PLAYER + /** * Function ToPlotter * Open a dialog frame to create plot and drill files diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 7c764e0805..bb119edf23 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -211,3 +211,14 @@ void PCB_EDIT_FRAME::SendMessageToEESCHEMA( BOARD_ITEM* aSyncItem ) } } + +#include + +void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) +{ + // @todo switch on command type + std::string payload = mail.GetPayload(); + + ExecuteRemoteCommand( payload.c_str() ); +} + diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 62a21ad005..04ecd6af0b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -1171,3 +1171,4 @@ void PCB_EDIT_FRAME::SetRotationAngle( int aRotationAngle ) m_rotationAngle = aRotationAngle; } +