Revert "Don't use TOOL_EVENT parameters for line modes."
This reverts commit 84a63f7daa
.
This commit is contained in:
parent
44810e8c09
commit
b00361d136
|
@ -889,22 +889,32 @@ TOOL_ACTION EE_ACTIONS::toggleOPCurrents( "eeschema.EditorControl.showOperatingP
|
||||||
_( "Show OP Currents" ),
|
_( "Show OP Currents" ),
|
||||||
_( "Show operating point current data from simulation" ) );
|
_( "Show operating point current data from simulation" ) );
|
||||||
|
|
||||||
TOOL_ACTION EE_ACTIONS::lineModeFree( "eeschema.EditorControl.lineModeFree",
|
TOOL_ACTION EE_ACTIONS::lineModeFree( TOOL_ACTION_ARGS()
|
||||||
AS_GLOBAL, 0, "",
|
.Name( "eeschema.EditorControl.lineModeFree" )
|
||||||
_( "Line Mode for Wires and Buses" ), _( "Draw and drag at any angle" ),
|
.Scope( AS_GLOBAL )
|
||||||
BITMAPS::lines_any );
|
.MenuText( _( "Line Mode for Wires and Buses" ) )
|
||||||
|
.Tooltip( _( "Draw and drag at any angle" ) )
|
||||||
|
.Icon( BITMAPS::lines_any )
|
||||||
|
.Flags( AF_NONE )
|
||||||
|
.Parameter( LINE_MODE::LINE_MODE_FREE ) );
|
||||||
|
|
||||||
TOOL_ACTION EE_ACTIONS::lineMode90( "eeschema.EditorControl.lineModeOrthonal",
|
TOOL_ACTION EE_ACTIONS::lineMode90( TOOL_ACTION_ARGS()
|
||||||
AS_GLOBAL, 0, "",
|
.Name( "eeschema.EditorControl.lineModeOrthonal" )
|
||||||
_( "Line Mode for Wires and Buses" ),
|
.Scope( AS_GLOBAL )
|
||||||
_( "Constrain drawing and dragging to horizontal or vertical motions" ),
|
.MenuText( _( "Line Mode for Wires and Buses" ) )
|
||||||
BITMAPS::lines90 );
|
.Tooltip( _( "Constrain drawing and dragging to horizontal or vertical motions" ) )
|
||||||
|
.Icon( BITMAPS::lines90 )
|
||||||
|
.Flags( AF_NONE )
|
||||||
|
.Parameter( LINE_MODE::LINE_MODE_90) );
|
||||||
|
|
||||||
TOOL_ACTION EE_ACTIONS::lineMode45( "eeschema.EditorControl.lineMode45",
|
TOOL_ACTION EE_ACTIONS::lineMode45( TOOL_ACTION_ARGS()
|
||||||
AS_GLOBAL, 0, "",
|
.Name( "eeschema.EditorControl.lineMode45" )
|
||||||
_( "Line Mode for Wires and Buses" ),
|
.Scope( AS_GLOBAL )
|
||||||
_( "Constrain drawing and dragging to horizontal, vertical, or 45-degree angle motions" ),
|
.MenuText( _( "Line Mode for Wires and Buses" ) )
|
||||||
BITMAPS::hv45mode );
|
.Tooltip( _( "Constrain drawing and dragging to horizontal, vertical, or 45-degree angle motions" ) )
|
||||||
|
.Icon( BITMAPS::hv45mode )
|
||||||
|
.Flags( AF_NONE )
|
||||||
|
.Parameter( LINE_MODE::LINE_MODE_45 ) );
|
||||||
|
|
||||||
TOOL_ACTION EE_ACTIONS::lineModeNext( "eeschema.EditorControl.lineModeNext",
|
TOOL_ACTION EE_ACTIONS::lineModeNext( "eeschema.EditorControl.lineModeNext",
|
||||||
AS_GLOBAL, MD_SHIFT + WXK_SPACE, "",
|
AS_GLOBAL, MD_SHIFT + WXK_SPACE, "",
|
||||||
|
|
|
@ -2231,13 +2231,7 @@ int SCH_EDITOR_CONTROL::ToggleOPCurrents( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
int SCH_EDITOR_CONTROL::ChangeLineMode( const TOOL_EVENT& aEvent )
|
int SCH_EDITOR_CONTROL::ChangeLineMode( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
if( aEvent.IsAction( &EE_ACTIONS::lineModeFree ) )
|
m_frame->eeconfig()->m_Drawing.line_mode = aEvent.Parameter<int>();
|
||||||
m_frame->eeconfig()->m_Drawing.line_mode = LINE_MODE::LINE_MODE_FREE;
|
|
||||||
else if( aEvent.IsAction( &EE_ACTIONS::lineMode45 ) )
|
|
||||||
m_frame->eeconfig()->m_Drawing.line_mode = LINE_MODE::LINE_MODE_45;
|
|
||||||
else
|
|
||||||
m_frame->eeconfig()->m_Drawing.line_mode = LINE_MODE::LINE_MODE_90;
|
|
||||||
|
|
||||||
m_toolMgr->RunAction( ACTIONS::refreshPreview );
|
m_toolMgr->RunAction( ACTIONS::refreshPreview );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2270,6 +2264,7 @@ int SCH_EDITOR_CONTROL::ToggleAnnotateRecursive( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
int SCH_EDITOR_CONTROL::TogglePythonConsole( const TOOL_EVENT& aEvent )
|
int SCH_EDITOR_CONTROL::TogglePythonConsole( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
|
|
||||||
m_frame->ScriptingConsoleEnableDisable();
|
m_frame->ScriptingConsoleEnableDisable();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue