Fix sf-2924962 and other issues with layer selection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcb |
Fix Released
|
Medium
|
Andrew Poelstra |
Bug Description
In general there was a lack of consistency in the behavior when
changing the visibility of layers using the buttons and menu. This
fixes both the hang in the bug report (lp:699308), and many other small issues.
The code attempted to make it so that the active layer was always
visible, but failed in a few places, such as when the silk or rats
layers were activated while hidden or hidden while active, or when the
last layer group was active and hidden, it remained active. There was
also issues when the active layer was hidden using the menus. This
patch fixes all of that.
This patch allows the active layer to become the silk or rats layer if
no copper layer is visible.
It was necessary to add an additional flag to ChangeGroupVisi
to indicate if the hid should be notified via the LayersChanged
action. This was causing problem when the menu was used to hide the
active layer, an extra LayersChanged call was scheduling a
ghid_menu_cb which reverted the change to the layer visibility. In
generally this was causing also just causing a lot of extra calls to
update the gui when the gui itself was calling ChangeGroupVisi
and was going to be updating itself later on anyway. For the most
part I set the new flag to be true (to keep the old behavior) except
when it was causing problems and definitely correct to set it to
false.
Changed in pcb: | |
status: | Incomplete → New |
status: | New → Incomplete |
description: | updated |
Changed in pcb: | |
milestone: | future-bug-release → next-bug-release |
Changed in pcb: | |
status: | Fix Committed → Fix Released |
I'm closing this until I have some time to take a better look later. I chatted a bit with Peter Clifton about this and he suggested (and I agree) that there should be a better way then adding an additional flag to ChangeGroupVisi bility. The whole mess of updating the gui too often needs to be cleaned up which should eliminate the need for the additional flag.