Prevent the point editor from fighting with other tools.
1) Don't start a long-click timer when the point editor is active. 2) Don't auto-start a wire when the point editor is active. Fixes https://gitlab.com/kicad/code/kicad/issues/9270
This commit is contained in:
parent
200ecfa8aa
commit
12b726ba2f
|
@ -50,6 +50,7 @@
|
|||
#include <tool/tool_event.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/ee_grid_helper.h>
|
||||
#include <tools/ee_point_editor.h>
|
||||
#include <tools/sch_line_wire_bus_tool.h>
|
||||
#include <trigo.h>
|
||||
#include <view/view.h>
|
||||
|
@ -348,7 +349,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
if( evt->IsMouseDown( BUT_LEFT ) )
|
||||
{
|
||||
// Avoid triggering when running under other tools
|
||||
if( m_frame->ToolStackIsEmpty() )
|
||||
if( m_frame->ToolStackIsEmpty() && !m_toolMgr->GetTool<EE_POINT_EDITOR>()->HasPoint() )
|
||||
{
|
||||
m_originalCursor = m_toolMgr->GetMousePosition();
|
||||
m_disambiguateTimer.StartOnce( 500 );
|
||||
|
@ -386,6 +387,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
LAYER_CONNECTABLE, nullptr );
|
||||
|
||||
if( m_frame->eeconfig()->m_Drawing.auto_start_wires
|
||||
&& !m_toolMgr->GetTool<EE_POINT_EDITOR>()->HasPoint()
|
||||
&& collector[0]->IsPointClickableAnchor( (wxPoint) snappedCursorPos ) )
|
||||
{
|
||||
OPT_TOOL_EVENT newEvt;
|
||||
|
@ -621,6 +623,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
LAYER_CONNECTABLE, nullptr );
|
||||
|
||||
if( m_frame->eeconfig()->m_Drawing.auto_start_wires
|
||||
&& !m_toolMgr->GetTool<EE_POINT_EDITOR>()->HasPoint()
|
||||
&& collector[0]->IsPointClickableAnchor( (wxPoint) snappedCursorPos ) )
|
||||
{
|
||||
SCH_CONNECTION* connection = collector[0]->Connection();
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#include <tool/tool_event.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tool/selection.h>
|
||||
#include <tools/pl_point_editor.h>
|
||||
#include <tools/pl_selection_tool.h>
|
||||
#include <tools/pl_actions.h>
|
||||
#include <drawing_sheet/ds_data_item.h>
|
||||
#include <drawing_sheet/ds_data_model.h>
|
||||
#include <drawing_sheet/ds_draw_item.h>
|
||||
|
@ -37,8 +40,6 @@
|
|||
#include <math/util.h> // for KiROUND
|
||||
|
||||
#include "pl_editor_frame.h"
|
||||
#include "pl_selection_tool.h"
|
||||
#include "tools/pl_actions.h"
|
||||
|
||||
/**
|
||||
* The maximum number of items in the clarify selection context menu. The current
|
||||
|
@ -113,7 +114,7 @@ int PL_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
if( evt->IsMouseDown( BUT_LEFT ) )
|
||||
{
|
||||
// Avoid triggering when running under other tools
|
||||
if( m_frame->ToolStackIsEmpty() )
|
||||
if( m_frame->ToolStackIsEmpty() && !m_toolMgr->GetTool<PL_POINT_EDITOR>()->HasPoint() )
|
||||
{
|
||||
m_originalCursor = m_toolMgr->GetMousePosition();
|
||||
m_disambiguateTimer.StartOnce( 500 );
|
||||
|
|
|
@ -52,15 +52,16 @@ using namespace std::placeholders;
|
|||
#include <pcbnew_settings.h>
|
||||
#include <tool/tool_event.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/tool_event_utils.h>
|
||||
#include <tools/pcb_point_editor.h>
|
||||
#include <tools/pcb_selection_tool.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
#include <connectivity/connectivity_data.h>
|
||||
#include <footprint_viewer_frame.h>
|
||||
#include <id.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/log.h>
|
||||
#include "tool_event_utils.h"
|
||||
#include "pcb_selection_tool.h"
|
||||
#include "pcb_actions.h"
|
||||
|
||||
|
||||
class SELECT_MENU : public ACTION_MENU
|
||||
|
@ -265,7 +266,7 @@ int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
else if( evt->IsMouseDown( BUT_LEFT ) )
|
||||
{
|
||||
// Avoid triggering when running under other tools
|
||||
if( m_frame->ToolStackIsEmpty() )
|
||||
if( m_frame->ToolStackIsEmpty() && !m_toolMgr->GetTool<PCB_POINT_EDITOR>()->HasPoint() )
|
||||
{
|
||||
m_originalCursor = m_toolMgr->GetMousePosition();
|
||||
m_disambiguateTimer.StartOnce( 500 );
|
||||
|
|
Loading…
Reference in New Issue