[Kstars-devel] kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Tue Jan 25 08:47:27 CET 2005
CVS commit by harris:
More robust handling of cities list in Location Dialog. The previous
implementation was pretty kludgy: we kept an array of integers that
represented the index numbers in the master city list of each city in
the (possibly filtered) list box of the dialog. We then tried to match
that integer back to the master list to identify cities in the list box.
This worked, until we re-sorted the listbox contents without re-ordering
the array of integer IDs. oops.
Instead, we now keep a QPtrList in LocationDialog for the "filtered"
cities. Items in the list box are just name strings, so to match a name
in the listbox to a city in the filtered list, we still must match by
name. So, I added a function GeoLocation::fullName() which returns the
"City, Province, Country" string which is used to construct the listbox
contents and match the listbox items to actual cities.
The bottom line is, it actually works now, and the code is much less
ugly too.
Thanks for the bug report (I fixed the Massachusetts typo too).
CCMAIL: kstars-devel at kde.org
BUG: 97819
M +11 -0 geolocation.cpp 1.12
M +5 -1 geolocation.h 1.17
M +2 -3 kstarsactions.cpp 1.123
M +72 -88 locationdialog.cpp 1.42
M +19 -28 locationdialog.h 1.21
M +11 -11 mapcanvas.cpp 1.15
M +3 -3 tools/altvstime.cpp 1.19
M +7 -8 tools/scriptbuilder.cpp 1.40
M +4 -6 tools/wutdialog.cpp 1.36
More information about the Kstars-devel
mailing list