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
823623ac
Commit
823623ac
authored
Nov 21, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
selection_tool: Renamed deselect* to unselect* for naming consistency.
parent
62e2537e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
22 deletions
+22
-22
point_editor.cpp
pcbnew/tools/point_editor.cpp
+2
-2
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+11
-11
selection_tool.h
pcbnew/tools/selection_tool.h
+9
-9
No files found.
pcbnew/tools/point_editor.cpp
View file @
823623ac
...
...
@@ -233,7 +233,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent )
{
if
(
!
m_editPoints
||
evt
->
Matches
(
m_selectionTool
->
ClearedEvent
)
||
evt
->
Matches
(
m_selectionTool
->
De
selectedEvent
)
||
evt
->
Matches
(
m_selectionTool
->
Un
selectedEvent
)
||
evt
->
Matches
(
m_selectionTool
->
SelectedEvent
)
)
{
break
;
...
...
@@ -783,7 +783,7 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint )
void
POINT_EDITOR
::
setTransitions
()
{
Go
(
&
POINT_EDITOR
::
OnSelectionChange
,
m_selectionTool
->
SelectedEvent
);
Go
(
&
POINT_EDITOR
::
OnSelectionChange
,
m_selectionTool
->
De
selectedEvent
);
Go
(
&
POINT_EDITOR
::
OnSelectionChange
,
m_selectionTool
->
Un
selectedEvent
);
}
...
...
pcbnew/tools/selection_tool.cpp
View file @
823623ac
...
...
@@ -52,7 +52,7 @@
SELECTION_TOOL
::
SELECTION_TOOL
()
:
TOOL_INTERACTIVE
(
"pcbnew.InteractiveSelection"
),
SelectedEvent
(
TC_MESSAGE
,
TA_ACTION
,
"pcbnew.InteractiveSelection.selected"
),
DeselectedEvent
(
TC_MESSAGE
,
TA_ACTION
,
"pcbnew.InteractiveSelection.de
selected"
),
UnselectedEvent
(
TC_MESSAGE
,
TA_ACTION
,
"pcbnew.InteractiveSelection.un
selected"
),
ClearedEvent
(
TC_MESSAGE
,
TA_ACTION
,
"pcbnew.InteractiveSelection.cleared"
),
m_frame
(
NULL
),
m_additive
(
false
),
m_multiple
(
false
),
m_editModules
(
false
),
m_locked
(
true
)
...
...
@@ -221,11 +221,11 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem )
{
if
(
aItem
->
IsSelected
()
)
{
de
select
(
aItem
);
un
select
(
aItem
);
// Inform other potentially interested tools
TOOL_EVENT
deselectEvent
(
De
selectedEvent
);
m_toolMgr
->
ProcessEvent
(
de
selectEvent
);
TOOL_EVENT
unselectEvent
(
Un
selectedEvent
);
m_toolMgr
->
ProcessEvent
(
un
selectEvent
);
}
else
{
...
...
@@ -734,17 +734,17 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem )
}
void
SELECTION_TOOL
::
de
select
(
BOARD_ITEM
*
aItem
)
void
SELECTION_TOOL
::
un
select
(
BOARD_ITEM
*
aItem
)
{
// Modules are treated in a special way - when they are selected, we have to
//
de
select all the parts that make the module, not the module itself
//
un
select all the parts that make the module, not the module itself
if
(
aItem
->
Type
()
==
PCB_MODULE_T
)
{
MODULE
*
module
=
static_cast
<
MODULE
*>
(
aItem
);
module
->
RunOnChildren
(
boost
::
bind
(
&
SELECTION_TOOL
::
de
selectVisually
,
this
,
_1
)
);
module
->
RunOnChildren
(
boost
::
bind
(
&
SELECTION_TOOL
::
un
selectVisually
,
this
,
_1
)
);
}
de
selectVisually
(
aItem
);
un
selectVisually
(
aItem
);
int
itemIdx
=
m_selection
.
items
.
FindItem
(
aItem
);
if
(
itemIdx
>=
0
)
...
...
@@ -757,8 +757,8 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem )
}
// Inform other potentially interested tools
TOOL_EVENT
deselected
(
De
selectedEvent
);
m_toolMgr
->
ProcessEvent
(
de
selected
);
TOOL_EVENT
unselected
(
Un
selectedEvent
);
m_toolMgr
->
ProcessEvent
(
un
selected
);
}
...
...
@@ -772,7 +772,7 @@ void SELECTION_TOOL::selectVisually( BOARD_ITEM* aItem ) const
}
void
SELECTION_TOOL
::
de
selectVisually
(
BOARD_ITEM
*
aItem
)
const
void
SELECTION_TOOL
::
un
selectVisually
(
BOARD_ITEM
*
aItem
)
const
{
m_selection
.
group
->
Remove
(
aItem
);
...
...
pcbnew/tools/selection_tool.h
View file @
823623ac
...
...
@@ -160,8 +160,8 @@ public:
///> Event sent after an item is selected.
const
TOOL_EVENT
SelectedEvent
;
///> Event sent after an item is
de
selected.
const
TOOL_EVENT
De
selectedEvent
;
///> Event sent after an item is
un
selected.
const
TOOL_EVENT
Un
selectedEvent
;
///> Event sent after selection is cleared.
const
TOOL_EVENT
ClearedEvent
;
...
...
@@ -247,26 +247,26 @@ private:
void
select
(
BOARD_ITEM
*
aItem
);
/**
* Function
de
selectItem()
* Takes necessary action mark an item as
de
selected.
* Function
un
selectItem()
* Takes necessary action mark an item as
un
selected.
*
* @param aItem is an item to be
de
selected.
* @param aItem is an item to be
un
selected.
*/
void
de
select
(
BOARD_ITEM
*
aItem
);
void
un
select
(
BOARD_ITEM
*
aItem
);
/**
* Function
de
selectVisually()
* Function
un
selectVisually()
* Marks item as selected, but does not add it to the ITEMS_PICKED_LIST.
* @param aItem is an item to be be marked.
*/
void
selectVisually
(
BOARD_ITEM
*
aItem
)
const
;
/**
* Function
de
selectVisually()
* Function
un
selectVisually()
* Marks item as selected, but does not add it to the ITEMS_PICKED_LIST.
* @param aItem is an item to be be marked.
*/
void
de
selectVisually
(
BOARD_ITEM
*
aItem
)
const
;
void
un
selectVisually
(
BOARD_ITEM
*
aItem
)
const
;
/**
* Function containsSelected()
...
...
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