eeschema: Close ERC before placing components
We have a dialog shim that raises the ERC dialog in front of the schematic frame, which is useful for keeping the ERC dialog visible during debugging. But mouse move events do not pass through to the schematic, resulting in a captured mouse pointer but no drawing updates. As a work-around we close the ERC dialog while placing new components. Previous ERC data still exist when the window is launched again. Fixes: lp:1779851 * https://bugs.launchpad.net/kicad/+bug/1779851
This commit is contained in:
parent
5f74560a46
commit
d0ea844557
|
@ -287,6 +287,8 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
case ID_SCH_PLACE_COMPONENT:
|
||||
if( (item == NULL) || (item->GetFlags() == 0) )
|
||||
{
|
||||
// ERC dialog interferes with moving items so we close it before starting
|
||||
CloseErc();
|
||||
GetScreen()->SetCurItem( Load_Component( aDC, NULL,
|
||||
s_CmpNameList, true ) );
|
||||
m_canvas->SetAutoPanRequest( true );
|
||||
|
|
|
@ -810,6 +810,16 @@ void SCH_EDIT_FRAME::OnErc( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::CloseErc()
|
||||
{
|
||||
// Find the ERC dialog if it's open and close it
|
||||
wxWindow* erc = FindWindowById( ID_DIALOG_ERC, this );
|
||||
|
||||
if( erc )
|
||||
erc->Close( false );
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::OnUpdatePCB( wxCommandEvent& event )
|
||||
{
|
||||
doUpdatePcb( "" );
|
||||
|
|
|
@ -912,6 +912,11 @@ private:
|
|||
void OnUpdateHierarchySheet( wxUpdateUIEvent& aEvent );
|
||||
void OnUpdateRemapSymbols( wxUpdateUIEvent& aEvent );
|
||||
|
||||
/**
|
||||
* Close the ERC dialog if it is open.
|
||||
*/
|
||||
void CloseErc();
|
||||
|
||||
/**
|
||||
* Set the main window title bar text.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue