Fix 3D viewer canvas timer event clash.
Manual cherry-pick of commit f6297d328c
.
This commit is contained in:
parent
bce8c95647
commit
0593663462
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -89,8 +89,8 @@ END_EVENT_TABLE()
|
|||
|
||||
EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
|
||||
BOARD_ADAPTER& aBoardAdapter, CAMERA& aCamera,
|
||||
S3D_CACHE* a3DCachePointer )
|
||||
: HIDPI_GL_CANVAS( aParent, wxID_ANY, aAttribList, wxDefaultPosition, wxDefaultSize,
|
||||
S3D_CACHE* a3DCachePointer ) :
|
||||
HIDPI_GL_CANVAS( aParent, wxID_ANY, aAttribList, wxDefaultPosition, wxDefaultSize,
|
||||
wxFULL_REPAINT_ON_RESIZE ),
|
||||
m_eventDispatcher( nullptr ),
|
||||
m_parentStatusBar( nullptr ),
|
||||
|
@ -98,6 +98,8 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
|
|||
m_glRC( nullptr ),
|
||||
m_is_opengl_initialized( false ),
|
||||
m_is_opengl_version_supported( true ),
|
||||
m_editing_timeout_timer( this, wxID_HIGHEST + 1 ),
|
||||
m_redraw_trigger_timer( this, wxID_HIGHEST + 2 ),
|
||||
m_mouse_is_moving( false ),
|
||||
m_mouse_was_moved( false ),
|
||||
m_camera_is_moving( false ),
|
||||
|
@ -845,8 +847,14 @@ void EDA_3D_CANVAS::OnMiddleUp( wxMouseEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::OnTimerTimeout_Editing( wxTimerEvent& /* event */ )
|
||||
void EDA_3D_CANVAS::OnTimerTimeout_Editing( wxTimerEvent& aEvent )
|
||||
{
|
||||
if( aEvent.GetId() != m_editing_timeout_timer.GetId() )
|
||||
{
|
||||
aEvent.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
m_mouse_is_moving = false;
|
||||
m_mouse_was_moved = false;
|
||||
|
||||
|
@ -867,8 +875,14 @@ void EDA_3D_CANVAS::restart_editingTimeOut_Timer()
|
|||
}
|
||||
|
||||
|
||||
void EDA_3D_CANVAS::OnTimerTimeout_Redraw( wxTimerEvent& event )
|
||||
void EDA_3D_CANVAS::OnTimerTimeout_Redraw( wxTimerEvent& aEvent )
|
||||
{
|
||||
if( aEvent.GetId() != m_redraw_trigger_timer.GetId() )
|
||||
{
|
||||
aEvent.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
Request_refresh( true );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue