pcb

Fix sf-2924962 and other issues with layer selection

Bug #699482 reported by Jared Casper
16
This bug affects 2 people
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 ChangeGroupVisibility()
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 ChangeGroupVisibility
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.

Revision history for this message
Jared Casper (jaredcasper) wrote :
Revision history for this message
Jared Casper (jaredcasper) wrote : RE: Fix pr2924962 and other issues with layer selection

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 ChangeGroupVisibility. The whole mess of updating the gui too often needs to be cleaned up which should eliminate the need for the additional flag.

Revision history for this message
Peter Clifton (pcjc2) wrote :

This was probably imported with the wrong status. "Closed" on SF often meant "Fixed".

Changed in pcb:
assignee: nobody → Jared Casper (jaredcasper)
status: Fix Released → Incomplete
summary: - Fix pr2924962 and other issues with layer selection
+ Fix sf-2924962 and other issues with layer selection
Revision history for this message
Peter Clifton (pcjc2) wrote :

Note that the sf-2924962 bug mentioned in the title is Launchpad Bug# 699308

Peter Clifton (pcjc2)
Changed in pcb:
status: Incomplete → New
status: New → Incomplete
Felix Ruoff (felixruoff)
description: updated
Revision history for this message
Andrew Poelstra (asp11) wrote :

My new Gtk layer selector widget will fix all these. The widget doesn't care about the difference between rats, silk and copper, so it is consistent in its treatment of them. It also has new accelerators to allow selection and toggling of up to 20 layers.

Changed in pcb:
assignee: Jared Casper (jaredcasper) → Andrew Poelstra (asp11)
Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

Bug was fixed by a commit
git master commit 2948179e8c693f2ca8666e0ca212198254e76285
http://git.gpleda.org/?p=pcb.git;a=commit;h=2948179e8c693f2ca8666e0ca212198254e76285

commit 2948179e8c693f2ca8666e0ca212198254e76285
Author: Andrew Poelstra <email address hidden>
Commit: Andrew Poelstra <email address hidden>

    Use GtkPcbLayerSelector in gtk GUI

    Closes-bug: lp-699482

Changed in pcb:
status: Incomplete → Fix Committed
Peter Clifton (pcjc2)
Changed in pcb:
milestone: future-bug-release → next-bug-release
Peter Clifton (pcjc2)
Changed in pcb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.