Changing time format doesn't update clock
Bug #548571 reported by
Arisian
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
FreeGuide-TV |
Fix Released
|
Low
|
Unassigned |
Bug Description
Changing the time format in Tools/Options/
Changed in freeguide-tv: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in freeguide-tv: | |
milestone: | none → 0.11 |
Changed in freeguide-tv: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The flow of the current code looks something like this:
The initial HorizontalViewer is created with a config object loaded from the prefs.xml (I've no idea where this happens, btw, it's some sort of magic). The HorizontalViewer, as part of it's initialization, creates a TimePanel object passing it a reference to the config stored in the HorizontalViewer. This reference is stored locally by TimePanel as an instance variable, config.
At some point in the process, the user tries to reconfigure the HorizontalViewer via the Tools/Options menu, making changes and saving them. When the ConfigureUICont roller is created, it creates a local copy of the HorizontalViewer config using the clone() method. When the ConfigureUICont roller is closed, the save method updates the config instance variable then stores it in "parent.config". This places a reference to the new, cloned config into the "parent" which happens to be the original HorizontalViewer object. This reduces the reference count to the original config, which would normally be garbage collected and disposed of EXCEPT that TimePanel is maintaining a reference to this OLD, ORIGINAL config object in it's own instance variable.
Each time these JPanels are repainted, the TimePanel uses the original, load time config object while the drawProgrammes method is using the current config object stored within the HorizontalViewer object.
Ergo, you can't ever change the time format of the TimePanel without making a change, exiting FreeGuide and restarting.