fix autopan non-response problem when dragging block to right or bottom
This commit is contained in:
parent
b1489cbe40
commit
36aca68e40
|
@ -830,11 +830,11 @@ void EDA_DRAW_PANEL::OnMouseLeaving( wxMouseEvent& event )
|
||||||
if( !m_enableAutoPan || !m_requestAutoPan || m_ignoreMouseEvents )
|
if( !m_enableAutoPan || !m_requestAutoPan || m_ignoreMouseEvents )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Auto pan if mouse is leave working area:
|
// Auto pan if mouse has left the client window
|
||||||
wxSize size = GetClientSize();
|
wxSize size = GetClientSize();
|
||||||
|
|
||||||
if( ( size.x < event.GetX() ) || ( size.y < event.GetY() )
|
if( size.x <= event.GetX() || event.GetX() < 0 ||
|
||||||
|| ( event.GetX() <= 0) || ( event.GetY() <= 0 ) )
|
size.y <= event.GetY() || event.GetY() < 0 )
|
||||||
{
|
{
|
||||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_POPUP_ZOOM_CENTER );
|
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_POPUP_ZOOM_CENTER );
|
||||||
cmd.SetEventObject( this );
|
cmd.SetEventObject( this );
|
||||||
|
|
|
@ -604,11 +604,12 @@ void SCH_EDIT_FRAME::OnAnnotate( wxCommandEvent& event )
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::OnErc( wxCommandEvent& event )
|
void SCH_EDIT_FRAME::OnErc( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
// See if its already open...
|
// See if it's already open...
|
||||||
wxWindow* erc = FindWindowById( ID_DIALOG_ERC, this );
|
wxWindow* erc = FindWindowById( ID_DIALOG_ERC, this );
|
||||||
|
|
||||||
if( erc )
|
if( erc )
|
||||||
erc->Raise(); // bring it to the top if already open.
|
// Bring it to the top if already open. Dual monitor users need this.
|
||||||
|
erc->Raise();
|
||||||
else
|
else
|
||||||
InvokeDialogERC( this );
|
InvokeDialogERC( this );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue