protected virtual void DoEdit(object sender, System.EventArgs e) { try { Gtk.TreeIter itr; Gtk.TreeModel model; if (wptView.Selection.GetSelected(out model, out itr)) { Waypoint wpt = (Waypoint)model.GetValue(itr, 0); if (wpt is Geocache) { m_App.EditCache(); return; } m_App.EditChildWaypoint(wpt); } } catch (Exception ex) { OCMApp.ShowException(ex); } }