Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
kicad
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
KiCad
KiCad Source Code
kicad
Commits
0de924ab
Commit
0de924ab
authored
4 years ago
by
Jon Evans
Browse files
Options
Downloads
Patches
Plain Diff
Fix deletion of bus aliases on subsheets
Fixes
#4364
parent
97a9f43a
No related branches found
No related tags found
Loading
Pipeline
#234815694
passed
4 years ago
Stage: build
Stage: test
Stage: report
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
eeschema/dialogs/dialog_bus_manager.cpp
+9
-20
9 additions, 20 deletions
eeschema/dialogs/dialog_bus_manager.cpp
eeschema/dialogs/dialog_bus_manager.h
+2
-0
2 additions, 0 deletions
eeschema/dialogs/dialog_bus_manager.h
with
11 additions
and
20 deletions
eeschema/dialogs/dialog_bus_manager.cpp
+
9
−
20
View file @
0de924ab
...
...
@@ -196,6 +196,7 @@ void DIALOG_BUS_MANAGER::OnInitDialog( wxInitDialogEvent& aEvent )
bool
DIALOG_BUS_MANAGER
::
TransferDataToWindow
()
{
m_aliases
.
clear
();
m_screens
.
clear
();
const
SCH_SHEET_LIST
&
sheets
=
m_parent
->
Schematic
().
GetSheets
();
...
...
@@ -215,8 +216,10 @@ bool DIALOG_BUS_MANAGER::TransferDataToWindow()
// clone into a temporary working set
int
idx
=
0
;
for
(
const
auto
&
alias
:
original_aliases
)
for
(
const
std
::
shared_ptr
<
BUS_ALIAS
>&
alias
:
original_aliases
)
{
m_screens
.
insert
(
alias
->
GetParent
()
);
m_aliases
.
push_back
(
alias
->
Clone
()
);
auto
text
=
getAliasDisplayText
(
alias
);
m_bus_list_view
->
InsertItem
(
idx
,
text
);
...
...
@@ -248,25 +251,11 @@ void DIALOG_BUS_MANAGER::OnCancelClick( wxCommandEvent& aEvent )
bool
DIALOG_BUS_MANAGER
::
TransferDataFromWindow
()
{
// Since we have a clone of all the data, and it is from potentially
// multiple screens, the way this works is to rebuild each screen's aliases.
// A list of screens is stored here so that the screen's alias list is only
// cleared once.
std
::
unordered_set
<
SCH_SCREEN
*
>
cleared_list
;
for
(
const
auto
&
alias
:
m_aliases
)
{
auto
screen
=
alias
->
GetParent
();
if
(
cleared_list
.
count
(
screen
)
==
0
)
{
for
(
SCH_SCREEN
*
screen
:
m_screens
)
screen
->
ClearBusAliases
();
cleared_list
.
insert
(
screen
);
}
screen
->
AddBusAlias
(
alias
)
;
}
for
(
const
std
::
shared_ptr
<
BUS_ALIAS
>&
alias
:
m_
alias
es
)
alias
->
GetParent
()
->
AddBusAlias
(
alias
);
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
eeschema/dialogs/dialog_bus_manager.h
+
2
−
0
View file @
0de924ab
...
...
@@ -79,6 +79,8 @@ private:
std
::
vector
<
std
::
shared_ptr
<
BUS_ALIAS
>
>
m_aliases
;
std
::
unordered_set
<
SCH_SCREEN
*>
m_screens
;
std
::
shared_ptr
<
BUS_ALIAS
>
m_active_alias
;
DECLARE_EVENT_TABLE
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment