Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c1eda6b8
Commit
c1eda6b8
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some of the Tool Actions need to be run in immediate mode - fixed.
parent
49dd416c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
router_tool.cpp
pcbnew/router/router_tool.cpp
+1
-1
drawing_tool.cpp
pcbnew/tools/drawing_tool.cpp
+9
-9
edit_tool.cpp
pcbnew/tools/edit_tool.cpp
+8
-8
module_tools.cpp
pcbnew/tools/module_tools.cpp
+2
-2
No files found.
pcbnew/router/router_tool.cpp
View file @
c1eda6b8
...
@@ -626,7 +626,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -626,7 +626,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent )
BOARD_DESIGN_SETTINGS
&
bds
=
board
->
GetDesignSettings
();
BOARD_DESIGN_SETTINGS
&
bds
=
board
->
GetDesignSettings
();
// Deselect all items
// Deselect all items
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
SetToolID
(
ID_TRACK_BUTT
,
wxCURSOR_PENCIL
,
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
SetToolID
(
ID_TRACK_BUTT
,
wxCURSOR_PENCIL
,
_
(
"Interactive Router"
)
);
_
(
"Interactive Router"
)
);
...
...
pcbnew/tools/drawing_tool.cpp
View file @
c1eda6b8
...
@@ -251,7 +251,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent )
...
@@ -251,7 +251,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent )
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
...
@@ -450,7 +450,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent )
...
@@ -450,7 +450,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent )
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
preview
.
ViewUpdate
(
KIGFX
::
VIEW_ITEM
::
GEOMETRY
);
preview
.
ViewUpdate
(
KIGFX
::
VIEW_ITEM
::
GEOMETRY
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetAutoPan
(
true
);
m_controls
->
SetAutoPan
(
true
);
...
@@ -525,7 +525,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
...
@@ -525,7 +525,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetAutoPan
(
true
);
m_controls
->
SetAutoPan
(
true
);
...
@@ -703,7 +703,7 @@ int DRAWING_TOOL::PlaceDXF( TOOL_EVENT& aEvent )
...
@@ -703,7 +703,7 @@ int DRAWING_TOOL::PlaceDXF( TOOL_EVENT& aEvent )
BOARD_ITEM
*
firstItem
=
static_cast
<
BOARD_ITEM
*>
(
*
preview
.
Begin
()
);
BOARD_ITEM
*
firstItem
=
static_cast
<
BOARD_ITEM
*>
(
*
preview
.
Begin
()
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
...
@@ -877,7 +877,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic,
...
@@ -877,7 +877,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic,
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
...
@@ -1042,7 +1042,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic )
...
@@ -1042,7 +1042,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic )
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
...
@@ -1212,7 +1212,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
...
@@ -1212,7 +1212,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
...
@@ -1421,7 +1421,7 @@ int DRAWING_TOOL::placeTextModule()
...
@@ -1421,7 +1421,7 @@ int DRAWING_TOOL::placeTextModule()
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetAutoPan
(
true
);
m_controls
->
SetAutoPan
(
true
);
...
@@ -1539,7 +1539,7 @@ int DRAWING_TOOL::placeTextPcb()
...
@@ -1539,7 +1539,7 @@ int DRAWING_TOOL::placeTextPcb()
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
KIGFX
::
VIEW_GROUP
preview
(
m_view
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetAutoPan
(
true
);
m_controls
->
SetAutoPan
(
true
);
...
...
pcbnew/tools/edit_tool.cpp
View file @
c1eda6b8
...
@@ -181,7 +181,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -181,7 +181,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
}
}
selection
.
group
->
ViewUpdate
(
KIGFX
::
VIEW_ITEM
::
GEOMETRY
);
selection
.
group
->
ViewUpdate
(
KIGFX
::
VIEW_ITEM
::
GEOMETRY
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
,
true
);
}
}
else
if
(
evt
->
IsMouseUp
(
BUT_LEFT
)
||
evt
->
IsClick
(
BUT_LEFT
)
)
else
if
(
evt
->
IsMouseUp
(
BUT_LEFT
)
||
evt
->
IsClick
(
BUT_LEFT
)
)
...
@@ -205,7 +205,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -205,7 +205,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
}
}
if
(
unselect
)
if
(
unselect
)
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
RN_DATA
*
ratsnest
=
getModel
<
BOARD
>
()
->
GetRatsnest
();
RN_DATA
*
ratsnest
=
getModel
<
BOARD
>
()
->
GetRatsnest
();
ratsnest
->
ClearSimple
();
ratsnest
->
ClearSimple
();
...
@@ -278,7 +278,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent )
...
@@ -278,7 +278,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent )
getModel
<
BOARD
>
()
->
GetRatsnest
()
->
Recalculate
();
getModel
<
BOARD
>
()
->
GetRatsnest
()
->
Recalculate
();
item
->
ViewUpdate
();
item
->
ViewUpdate
();
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
,
true
);
}
}
item
->
SetFlags
(
flags
);
item
->
SetFlags
(
flags
);
...
@@ -335,9 +335,9 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent )
...
@@ -335,9 +335,9 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent )
getModel
<
BOARD
>
()
->
GetRatsnest
()
->
Recalculate
();
getModel
<
BOARD
>
()
->
GetRatsnest
()
->
Recalculate
();
if
(
unselect
)
if
(
unselect
)
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
,
true
);
setTransitions
();
setTransitions
();
return
0
;
return
0
;
...
@@ -389,9 +389,9 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent )
...
@@ -389,9 +389,9 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent )
getModel
<
BOARD
>
()
->
GetRatsnest
()
->
Recalculate
();
getModel
<
BOARD
>
()
->
GetRatsnest
()
->
Recalculate
();
if
(
unselect
)
if
(
unselect
)
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
pointEditorUpdate
,
true
);
setTransitions
();
setTransitions
();
return
0
;
return
0
;
...
@@ -414,7 +414,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent )
...
@@ -414,7 +414,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent )
PCB_BASE_FRAME
*
editFrame
=
getEditFrame
<
PCB_BASE_FRAME
>
();
PCB_BASE_FRAME
*
editFrame
=
getEditFrame
<
PCB_BASE_FRAME
>
();
// As we are about to remove items, they have to be removed from the selection first
// As we are about to remove items, they have to be removed from the selection first
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
// Save them
// Save them
for
(
unsigned
int
i
=
0
;
i
<
selectedItems
.
GetCount
();
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
selectedItems
.
GetCount
();
++
i
)
...
...
pcbnew/tools/module_tools.cpp
View file @
c1eda6b8
...
@@ -258,7 +258,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent )
...
@@ -258,7 +258,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent )
Activate
();
Activate
();
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
while
(
OPT_TOOL_EVENT
evt
=
Wait
()
)
while
(
OPT_TOOL_EVENT
evt
=
Wait
()
)
...
@@ -433,7 +433,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent )
...
@@ -433,7 +433,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent )
preview
.
Add
(
pastedModule
);
preview
.
Add
(
pastedModule
);
m_view
->
Add
(
&
preview
);
m_view
->
Add
(
&
preview
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
);
m_toolMgr
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
ShowCursor
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetSnapping
(
true
);
m_controls
->
SetAutoPan
(
true
);
m_controls
->
SetAutoPan
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment