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
0d9373ca
Commit
0d9373ca
authored
May 14, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undo/report support for track dragging (PNS).
parent
d7ac3682
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
pns_router.cpp
pcbnew/router/pns_router.cpp
+0
-4
router_tool.cpp
pcbnew/router/router_tool.cpp
+22
-2
No files found.
pcbnew/router/pns_router.cpp
View file @
0d9373ca
...
...
@@ -373,13 +373,9 @@ void PNS_ROUTER::ClearWorld()
if
(
m_placer
)
delete
m_placer
;
if
(
m_previewItems
)
delete
m_previewItems
;
m_clearanceFunc
=
NULL
;
m_world
=
NULL
;
m_placer
=
NULL
;
m_previewItems
=
NULL
;
}
...
...
pcbnew/router/router_tool.cpp
View file @
0d9373ca
...
...
@@ -621,8 +621,6 @@ void ROUTER_TOOL::performRouting()
m_needsSync
=
true
;
}
m_settings
=
m_router
->
Settings
();
ctls
->
SetAutoPan
(
false
);
ctls
->
ForceCursorPosition
(
false
);
highlightNet
(
false
);
...
...
@@ -683,6 +681,8 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent )
ctls
->
ShowCursor
(
false
);
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
SetToolID
(
ID_NO_TOOL_SELECTED
,
wxCURSOR_DEFAULT
,
wxEmptyString
);
// Store routing settings till the next invocation
m_settings
=
m_router
->
Settings
();
delete
ctxMenu
;
return
0
;
...
...
@@ -691,6 +691,8 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent )
void
ROUTER_TOOL
::
performDragging
()
{
PCB_EDIT_FRAME
*
frame
=
getEditFrame
<
PCB_EDIT_FRAME
>
();
bool
saveUndoBuffer
=
true
;
VIEW_CONTROLS
*
ctls
=
getViewControls
();
bool
dragStarted
=
m_router
->
StartDragging
(
m_startSnapPoint
,
m_startItem
);
...
...
@@ -708,6 +710,11 @@ void ROUTER_TOOL::performDragging()
{
if
(
evt
->
IsCancel
()
)
break
;
else
if
(
evt
->
Action
()
==
TA_UNDO_REDO
)
{
saveUndoBuffer
=
false
;
break
;
}
else
if
(
evt
->
IsMotion
()
)
{
updateEndItem
(
*
evt
);
...
...
@@ -726,6 +733,19 @@ void ROUTER_TOOL::performDragging()
if
(
m_router
->
RoutingInProgress
()
)
m_router
->
StopRouting
();
if
(
saveUndoBuffer
)
{
// Save the recent changes in the undo buffer
frame
->
SaveCopyInUndoList
(
m_router
->
GetUndoBuffer
(),
UR_UNSPECIFIED
);
m_router
->
ClearUndoBuffer
();
frame
->
OnModify
();
}
else
{
// It was interrupted by TA_UNDO_REDO event, so we have to sync the world now
m_needsSync
=
true
;
}
ctls
->
SetAutoPan
(
false
);
ctls
->
ForceCursorPosition
(
false
);
highlightNet
(
false
);
...
...
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