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
c1d6e444
Commit
c1d6e444
authored
Dec 18, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed optimization during selection of multiple items.
Removed debug output.
parent
87323530
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
edit_tool.cpp
pcbnew/tools/edit_tool.cpp
+0
-6
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+2
-4
No files found.
pcbnew/tools/edit_tool.cpp
View file @
c1d6e444
...
@@ -129,12 +129,6 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
...
@@ -129,12 +129,6 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
else
else
{
{
// Prepare to drag - save items, so changes can be undone
// Prepare to drag - save items, so changes can be undone
for
(
unsigned
int
i
=
0
;
i
<
selection
.
items
.
GetCount
();
++
i
)
{
BOARD_ITEM
*
item
=
static_cast
<
BOARD_ITEM
*>
(
selection
.
items
.
GetPickedItem
(
i
)
);
std
::
cout
<<
"saved "
<<
(
unsigned
long
)
item
<<
std
::
endl
;
}
editFrame
->
OnModify
();
editFrame
->
OnModify
();
editFrame
->
SaveCopyInUndoList
(
selection
.
items
,
UR_CHANGED
);
editFrame
->
SaveCopyInUndoList
(
selection
.
items
,
UR_CHANGED
);
...
...
pcbnew/tools/selection_tool.cpp
View file @
c1d6e444
...
@@ -503,7 +503,6 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem )
...
@@ -503,7 +503,6 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem )
{
{
MODULE
*
module
=
static_cast
<
MODULE
*>
(
aItem
);
MODULE
*
module
=
static_cast
<
MODULE
*>
(
aItem
);
module
->
RunOnChildren
(
std
::
bind1st
(
std
::
mem_fun
(
&
SELECTION_TOOL
::
selectVisually
),
this
)
);
module
->
RunOnChildren
(
std
::
bind1st
(
std
::
mem_fun
(
&
SELECTION_TOOL
::
selectVisually
),
this
)
);
}
}
selectVisually
(
aItem
);
selectVisually
(
aItem
);
...
@@ -519,8 +518,8 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem )
...
@@ -519,8 +518,8 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem )
// Now the context menu should be enabled
// Now the context menu should be enabled
SetContextMenu
(
&
m_menu
,
CMENU_BUTTON
);
SetContextMenu
(
&
m_menu
,
CMENU_BUTTON
);
}
}
else
else
if
(
m_selection
.
Size
()
==
2
)
// Check only for 2, so it will not be
{
{
// called for every next selected item
// If multiple items are selected, do not show the information about the selected item
// If multiple items are selected, do not show the information about the selected item
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
SetCurItem
(
NULL
,
true
);
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
SetCurItem
(
NULL
,
true
);
}
}
...
@@ -535,7 +534,6 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem )
...
@@ -535,7 +534,6 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem )
{
{
MODULE
*
module
=
static_cast
<
MODULE
*>
(
aItem
);
MODULE
*
module
=
static_cast
<
MODULE
*>
(
aItem
);
module
->
RunOnChildren
(
std
::
bind1st
(
std
::
mem_fun
(
&
SELECTION_TOOL
::
deselectVisually
),
this
)
);
module
->
RunOnChildren
(
std
::
bind1st
(
std
::
mem_fun
(
&
SELECTION_TOOL
::
deselectVisually
),
this
)
);
}
}
deselectVisually
(
aItem
);
deselectVisually
(
aItem
);
...
...
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