Ticket #1095 (assigned)

Opened 8 months ago

Last modified 4 months ago

"Show Advanced Properties" preference should take effect immediately

Reported by: markwoon Owned by: AlexanderPico
Milestone: Component: Pathvisio
Severity: minor Keywords:
Cc:

Description

The "Show Advanced Properties" preference currently does not take effect immediately. You have to reselect the PathwayElement?(s) before you can see the advanced properties.

I am attaching a patch that has the PropertyDisplayManager? listen for the PreferenceEvent? and updating the PathwayTableModel? after it has set the visibility of the advanced properties properly.

Note that the table model cannot listen for the event directly because it'll cause a race condition - the table model update must happen AFTER the PropertyDisplayManage? has done its thing.

Attachments

4-advanceProps.patch (4.7 KB) - added by markwoon 8 months ago.

Change History

Changed 8 months ago by markwoon

Changed 7 months ago by AlexanderPico

  • status changed from new to assigned
  • milestone changed from milestone_21 to milestone_22

Changed 7 months ago by thomaskelder

This looks like a flaw in PropertyDisplayManager? to me. Why doesn't it just consider the following flags on the fly (e.g. in isVisible):

  1. if the preference show advanced properties is true/false
  2. if the property is advanced or not (using isAdvanced)

I don't see the need for storing this information separately (introducing the need to keep it up-to-date) when you can look it up directly. If you look it up on the fly, you only need to refresh the property table after the preference has changed, making things simpler and more transparent.

Perhaps I'm missing something here...

Changed 7 months ago by markwoon

I'm assuming you're referring to the parts of the patch that persist the visibility for the advanced properties individually and not the whole patch.

The "Show Advanced Properties" is a very coarse on/off switch.

I was thinking that some users might want to independently hide/show some of the advanced properties. Doing it as you suggest would make this impossible. I would like to eventually see a preference panel that allows the user to set visibility and sort order of all registered properties.

Changed 4 months ago by AlexanderPico

  • milestone milestone_24 deleted
Note: See TracTickets for help on using tickets.