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
95a4f61e
Commit
95a4f61e
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wxWidgets 2.8 compatibility fix.
parent
5e48a796
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
tool_manager.cpp
common/tool/tool_manager.cpp
+12
-1
class_board.cpp
pcbnew/class_board.cpp
+3
-1
ratsnest_data.cpp
pcbnew/ratsnest_data.cpp
+3
-3
edit_tool.cpp
pcbnew/tools/edit_tool.cpp
+1
-1
No files found.
common/tool/tool_manager.cpp
View file @
95a4f61e
...
...
@@ -137,6 +137,11 @@ struct TOOL_MANAGER::TOOL_STATE
return
aRhs
.
theTool
!=
this
->
theTool
;
}
/**
* Function Push()
* Stores the current state of the tool on stack. Stacks are stored internally and are not
* shared between different TOOL_STATE objects.
*/
void
Push
()
{
stateStack
.
push
(
*
this
);
...
...
@@ -144,6 +149,12 @@ struct TOOL_MANAGER::TOOL_STATE
clear
();
}
/**
* Function Pop()
* Restores state of the tool from stack. Stacks are stored internally and are not
* shared between different TOOL_STATE objects.
* @return True if state was restored, false if the stack was empty.
*/
bool
Pop
()
{
delete
cofunc
;
...
...
@@ -603,7 +614,7 @@ bool TOOL_MANAGER::SaveClipboard( const std::string& aText )
{
if
(
wxTheClipboard
->
Open
()
)
{
wxTheClipboard
->
SetData
(
new
wxTextDataObject
(
aText
)
);
wxTheClipboard
->
SetData
(
new
wxTextDataObject
(
wxString
(
aText
.
c_str
(),
wxConvUTF8
)
)
);
wxTheClipboard
->
Close
();
return
true
;
...
...
pcbnew/class_board.cpp
View file @
95a4f61e
...
...
@@ -688,10 +688,12 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl )
m_Status_Pcb
=
0
;
break
;
case
PCB_MODULE_EDGE_T
:
assert
(
false
);
// TODO Orson: I am just checking if it is supposed to be here
case
PCB_DIMENSION_T
:
case
PCB_LINE_T
:
case
PCB_TEXT_T
:
case
PCB_MODULE_EDGE_T
:
case
PCB_TARGET_T
:
if
(
aControl
&
ADD_APPEND
)
m_Drawings
.
PushBack
(
aBoardItem
);
...
...
pcbnew/ratsnest_data.cpp
View file @
95a4f61e
...
...
@@ -305,7 +305,7 @@ void RN_NET::clearNode( const RN_NODE_PTR& aNode )
// Remove all ratsnest edges for associated with the node
newEnd
=
std
::
remove_if
(
m_rnEdges
->
begin
(),
m_rnEdges
->
end
(),
boost
::
bind
(
isEdgeConnectingNode
,
_1
,
aNode
)
);
boost
::
bind
(
isEdgeConnectingNode
,
_1
,
boost
::
ref
(
aNode
)
)
);
m_rnEdges
->
resize
(
std
::
distance
(
m_rnEdges
->
begin
(),
newEnd
)
);
}
...
...
@@ -629,7 +629,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode, int aN
closest
.
push_back
(
node
);
// Sort by the distance from aNode
closest
.
sort
(
boost
::
bind
(
sortDistance
,
aNode
,
_1
,
_2
)
);
closest
.
sort
(
boost
::
bind
(
sortDistance
,
boost
::
ref
(
aNode
)
,
_1
,
_2
)
);
// Remove the first node (==aNode), as it is surely located within the smallest distance
closest
.
pop_front
();
...
...
@@ -653,7 +653,7 @@ std::list<RN_NODE_PTR> RN_NET::GetClosestNodes( const RN_NODE_PTR& aNode,
closest
.
push_back
(
node
);
// Sort by the distance from aNode
closest
.
sort
(
boost
::
bind
(
sortDistance
,
aNode
,
_1
,
_2
)
);
closest
.
sort
(
boost
::
bind
(
sortDistance
,
boost
::
ref
(
aNode
)
,
_1
,
_2
)
);
// Remove the first node (==aNode), as it is surely located within the smallest distance
closest
.
pop_front
();
...
...
pcbnew/tools/edit_tool.cpp
View file @
95a4f61e
...
...
@@ -483,7 +483,7 @@ int EDIT_TOOL::PasteItems( TOOL_EVENT& aEvent )
try
{
BOARD_ITEM
*
item
=
io
.
Parse
(
m_toolMgr
->
GetClipboard
(
)
);
BOARD_ITEM
*
item
=
io
.
Parse
(
wxString
(
m_toolMgr
->
GetClipboard
().
c_str
(),
wxConvUTF8
)
);
assert
(
item
->
Type
()
==
PCB_MODULE_T
);
pastedModule
=
dyn_cast
<
MODULE
*>
(
item
);
}
...
...
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