DroidPlanner/droidplanner — pull request #796 by ne0fhyk (2014-06-09 03:14:44+00:00)
Title: Fix editor tools bugs

This fixes a couple of bugs, including crashing bugs, in the editor activity.

Changes log:
* Bug fixes for the editor tools:
* saved last selected editor tool so it can be retrieved after the fragment is recreated (i.e: after orientation switch). Before the selected tool would reset to the marker tool on orientation switch.
* exported commonly used code into functions.
* updated the editor tools view to reflect the selected tool after orientation switch.
* updated the editor activity to update the state of the tools on resume.

* Bug fixes for the editor tools item detail window:
* updated editor activity so that reference to a displayed item detail window is retained across activity lifecycle events. Before that update, dismissing an item detail window after a lifecycle event (i.e: orientation switch) would leave the mission item in a selected state (instead of deselecting it), among other possible issues.

* updated the mission detail fragment to notify its listener/parent when it's being dismissed, when shown as a dialog.