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
9250eb4e
Commit
9250eb4e
authored
Oct 14, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some enhancements and cleanup. Fixed problem when deleting Netclasses in Design rules dialog window
parent
89535a13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dialog_design_rules.cpp
pcbnew/dialog_design_rules.cpp
+4
-4
No files found.
pcbnew/dialog_design_rules.cpp
View file @
9250eb4e
...
@@ -484,8 +484,8 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event )
...
@@ -484,8 +484,8 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event )
// Sort selection by decreasing index order:
// Sort selection by decreasing index order:
select
.
Sort
(
sort_int
);
select
.
Sort
(
sort_int
);
bool
reinit
=
false
;
bool
reinit
=
false
;
// rows labels
seem have problems when deleting rows: they are not deleted properly
.
// rows labels
are not removed when deleting rows: they are not deleted
.
//
Workaround: store them, delete rows and reinit row labels (wxWidgets <= 2.9 )
//
So we must store them, remove correponding labels and reinit them
wxArrayString
labels
;
wxArrayString
labels
;
for
(
int
ii
=
0
;
ii
<
m_grid
->
GetNumberRows
();
ii
++
)
for
(
int
ii
=
0
;
ii
<
m_grid
->
GetNumberRows
();
ii
++
)
labels
.
Add
(
m_grid
->
GetRowLabelValue
(
ii
));
labels
.
Add
(
m_grid
->
GetRowLabelValue
(
ii
));
...
@@ -498,7 +498,7 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event )
...
@@ -498,7 +498,7 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event )
{
{
wxString
classname
=
m_grid
->
GetRowLabelValue
(
grid_row
);
wxString
classname
=
m_grid
->
GetRowLabelValue
(
grid_row
);
m_grid
->
DeleteRows
(
grid_row
);
m_grid
->
DeleteRows
(
grid_row
);
labels
.
RemoveAt
(
grid_row
);
labels
.
RemoveAt
(
grid_row
);
// Remove corresponding row label
reinit
=
true
;
reinit
=
true
;
// reset the net class to default for members of the removed class
// reset the net class to default for members of the removed class
...
@@ -509,7 +509,7 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event )
...
@@ -509,7 +509,7 @@ void DIALOG_DESIGN_RULES::OnRemoveNetclassClick( wxCommandEvent& event )
}
}
if
(
reinit
)
if
(
reinit
)
{
{
//
Workaround: reinit labels (wxWidgets <= 2.9 )
//
Reinit labels :
for
(
unsigned
ii
=
1
;
ii
<
labels
.
GetCount
();
ii
++
)
for
(
unsigned
ii
=
1
;
ii
<
labels
.
GetCount
();
ii
++
)
m_grid
->
SetRowLabelValue
(
ii
,
labels
[
ii
]);
m_grid
->
SetRowLabelValue
(
ii
,
labels
[
ii
]);
...
...
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