Opened 18 years ago
Closed 18 years ago
#4596 closed defect (fixed)
Don't add unnecessary data items to Active Screens
| Reported by: | Owned by: | stuartm | |
|---|---|---|---|
| Priority: | trivial | Milestone: | 0.21 |
| Component: | mythweather | Version: | head |
| Severity: | low | Keywords: | MythWeather settings |
| Cc: | stuartm | Ticket locked: | no |
Description
The code in weatherSetup.cpp currently adds all of the dataitems from the weatherdatalayout DB table to the Active Screen that is selected. This causes problems when you want to change the location for a given Active Screen.
What happens is, the plugin attempts to locate a source that supplies all of the dataitems that was provided for the previous location for the new location. Most grabbers don't supply the same dataitems for their locations. The end result is an incomplete list of possible locations to change to.
This patch makes sure that dataitem is only inserted into the ScreenListInfo object if the given type is defined for the current container.
Attachments (2)
Change History (7)
by , 18 years ago
| Attachment: | 4596_diff.patch added |
|---|
comment:1 by , 18 years ago
This problem can be reproduced by defining a new screen (i.e. Current Conditions) using the ENVCAN grabber (pick a Canadian city, like Edmonton). After saving the screen, try changing the location so that it's something the ENVCAN grabber doesn't know about (i.e. New York). You'll find 0 results returned. However, you can search for Canadian cities and get results from the ENVCAN grabber, but not the other grabbers (because they don't supply ALL of the dataitems that ENVCAN does).
After applying this patch everything works fine. :)
-- Joe Ripley vitaminjoe@…
comment:2 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
(In [15783]) "Check if dataitem belongs to the given container before adding it to ScreenListInfo->types"
Patch by Joe Ripley
Closes #4596
comment:3 by , 18 years ago
| Owner: | changed from to |
|---|
by , 18 years ago
| Attachment: | 4596_diff.2.patch added |
|---|
Initialize type list for each container first!
comment:4 by , 18 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → new |
Forgot to re-build the type list for each container as we enter it. This caused all of the types in the DB to get screwed up when changing the location of an existing 'Active Screen' definition.
I've tested this ad-nauseum. Should be good to commit.
-- Joe Ripley vitaminjoe@…

Check if dataitem belongs to the given container before adding it to ScreenListInfo->types