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
99c1d45f
Commit
99c1d45f
authored
Sep 26, 2012
by
Felix Morgner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added mutli-selection to cvpcb
parent
92f8f006
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
27 deletions
+34
-27
class_components_listbox.cpp
cvpcb/class_components_listbox.cpp
+1
-1
cvstruct.h
cvpcb/cvstruct.h
+2
-1
listboxes.cpp
cvpcb/listboxes.cpp
+4
-3
readwrite_dlgs.cpp
cvpcb/readwrite_dlgs.cpp
+27
-22
No files found.
cvpcb/class_components_listbox.cpp
View file @
99c1d45f
...
...
@@ -17,7 +17,7 @@
COMPONENTS_LISTBOX
::
COMPONENTS_LISTBOX
(
CVPCB_MAINFRAME
*
parent
,
wxWindowID
id
,
const
wxPoint
&
loc
,
const
wxSize
&
size
,
int
nbitems
,
wxString
choice
[]
)
:
ITEMS_LISTBOX_BASE
(
parent
,
id
,
loc
,
size
)
ITEMS_LISTBOX_BASE
(
parent
,
id
,
loc
,
size
,
~
wxLC_SINGLE_SEL
)
{
}
...
...
cvpcb/cvstruct.h
View file @
99c1d45f
...
...
@@ -18,7 +18,8 @@ class ITEMS_LISTBOX_BASE : public wxListView
{
public
:
ITEMS_LISTBOX_BASE
(
CVPCB_MAINFRAME
*
aParent
,
wxWindowID
aId
,
const
wxPoint
&
aLocation
,
const
wxSize
&
aSize
);
const
wxPoint
&
aLocation
,
const
wxSize
&
aSize
,
long
aStyle
=
wxLC_SINGLE_SEL
);
~
ITEMS_LISTBOX_BASE
();
...
...
cvpcb/listboxes.cpp
View file @
99c1d45f
...
...
@@ -19,11 +19,12 @@
******************************************************************************/
#define LISTB_STYLE wxSUNKEN_BORDER | wxLC_NO_HEADER | \
wxLC_
SINGLE_SEL | wxLC_
REPORT | wxLC_VIRTUAL
wxLC_REPORT | wxLC_VIRTUAL
ITEMS_LISTBOX_BASE
::
ITEMS_LISTBOX_BASE
(
CVPCB_MAINFRAME
*
aParent
,
wxWindowID
aId
,
const
wxPoint
&
aLocation
,
const
wxSize
&
aSize
)
:
wxListView
(
aParent
,
aId
,
aLocation
,
aSize
,
LISTB_STYLE
)
const
wxPoint
&
aLocation
,
const
wxSize
&
aSize
,
long
aStyle
)
:
wxListView
(
aParent
,
aId
,
aLocation
,
aSize
,
LISTB_STYLE
|
aStyle
)
{
InsertColumn
(
0
,
wxEmptyString
);
SetColumnWidth
(
0
,
wxLIST_AUTOSIZE
);
...
...
cvpcb/readwrite_dlgs.cpp
View file @
99c1d45f
...
...
@@ -39,53 +39,58 @@
#define titleComponentLibErr _( "Component Library Error" )
void
CVPCB_MAINFRAME
::
SetNewPkg
(
const
wxString
&
aFootprintName
)
{
COMPONENT_INFO
*
Component
;
bool
isUndefined
=
false
;
int
NumCmp
;
int
LastCmp
;
wxString
msg
;
if
(
m_components
.
empty
()
)
return
;
NumCmp
=
m_ListCmp
->
GetSelection
();
if
(
NumCmp
<
0
)
if
(
m_ListCmp
->
GetFirstSelected
()
<
0
)
{
NumCmp
=
0
;
m_ListCmp
->
SetSelection
(
NumCmp
,
true
);
}
Component
=
&
m_components
[
NumCmp
];
while
(
(
NumCmp
=
m_ListCmp
->
GetFirstSelected
()
)
!=
-
1
)
{
Component
=
&
m_components
[
NumCmp
];
if
(
Component
==
NULL
)
return
;
if
(
Component
==
NULL
)
return
;
isUndefined
=
Component
->
m_Footprint
.
IsEmpty
();
isUndefined
=
Component
->
m_Footprint
.
IsEmpty
();
Component
->
m_Footprint
=
aFootprintName
;
Component
->
m_Footprint
=
aFootprintName
;
msg
.
Printf
(
CMP_FORMAT
,
NumCmp
+
1
,
GetChars
(
Component
->
m_Reference
),
GetChars
(
Component
->
m_Value
),
GetChars
(
Component
->
m_Footprint
)
);
m_modified
=
true
;
msg
.
Printf
(
CMP_FORMAT
,
NumCmp
+
1
,
GetChars
(
Component
->
m_Reference
),
GetChars
(
Component
->
m_Value
),
GetChars
(
Component
->
m_Footprint
)
);
if
(
isUndefined
)
m_undefinedComponentCnt
-=
1
;
if
(
isUndefined
)
m_undefinedComponentCnt
-=
1
;
m_ListCmp
->
SetString
(
NumCmp
,
msg
);
m_ListCmp
->
SetSelection
(
NumCmp
,
false
);
m_ListCmp
->
SetString
(
NumCmp
,
msg
);
m_ListCmp
->
SetSelection
(
NumCmp
,
false
);
isUndefined
=
false
;
LastCmp
=
NumCmp
;
DisplayStatus
();
}
m_modified
=
true
;
// We activate next component:
if
(
NumCmp
<
(
m_ListCmp
->
GetCount
()
-
1
)
)
NumCmp
++
;
if
(
LastCmp
<
(
m_ListCmp
->
GetCount
()
-
1
)
)
NumCmp
=
LastCmp
+
1
;
m_ListCmp
->
SetSelection
(
NumCmp
,
true
);
DisplayStatus
();
}
...
...
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