/// <summary> /// Get the selected KmlItem. Will be needed to check if /// views have to be refreshed. /// </summary> /// <returns>The currently selected KmlItem</returns> public KmlItem GetSelectedItem() { IGuiManager manager = GetActiveGuiManager(); if (manager != null) { return(manager.GetSelectedItem()); } return(null); }
private void DockRepair_Click(object sender, RoutedEventArgs e) { KmlPartDock dock = (sender as MenuItem).DataContext as KmlPartDock; dock.Repair(); DlgMessage.ShowAndClear(Syntax.Messages); // Refresh view IGuiManager manager = GuiTabsManager.GetCurrent().VesselsManager; if (dock.Parent is KmlVessel && dock.Parent == manager.GetSelectedItem()) { manager.Select(dock.Parent); } }