cgeo/c-geo-opensource — pull request #1261 by campbeb (2012-03-10 00:03:30+00:00)
Title: Fix #1253 - Don't delete cache from database when just editing

This is a partial revert of 2657baf09bcd2cb73b7ddf517a173261a467854e. Calling `deleteWaypoint` removed it from the database. When the waypoint was then saved, it still had a valid id, so database was trying to update a row that no longer existed.

Made some other cleanup by moving code that appeared more than once into separate functions.

Fixes #1253