Re-sort map themes when changing favorite state
Closed, ResolvedPublic

Description

A right-click on a map theme in the "Map Themes" panel in Marble allows you to mark (or unmark) a map theme as a favorite map theme. Favorite map themes show a small yellow star icon and are sorted on top of other map themes, which are sorted by name then. Currently when marking (or unmarking) a map theme the list of map themes is not sorted again. This task is about changing this.

  • find the code that is responsible for the sorting and understand how it works. Start with MapViewWidget.cpp
  • activate the dynamicSortFilter property in MapThemeSortFilterProxyModel
  • when a map theme is (un-)marked as favorite, notify the source model about it so that it fires a dataChanged event which will cause the MapThemeSortFilterProxyModel to re-sort the map themes

Test your changes and generate a review request in Differential here at phabricator.kde.org.

nienhueser updated the task description. (Show Details)
nienhueser raised the priority of this task from to Normal.
nienhueser added a project: Marble.
nienhueser added a subscriber: nienhueser.
Sergobot claimed this task.Dec 30 2015, 8:18 AM
nienhueser moved this task from Backlog to Done on the Marble board.Jan 3 2016, 1:00 PM
Sergobot closed this task as Resolved.Dec 11 2016, 2:44 PM