public void RefreshContent() { if (Workspace == null) { return; } if (Workspace.CurrentGraph == null) { return; } if (Workspace.CurrentGraph != DiagramDrawer.DiagramViewModel.DataObject) { LoadDiagram(Workspace.CurrentGraph); } else { if (DiagramViewModel != null) { //TODO Micah, please check if it is valid to refresh it here //Doing this on Load does not handle shit like renaming DiagramViewModel.NavigationViewModel.Refresh(); } if (DiagramDrawer != null) { DiagramDrawer.Refresh(InvertGraphEditor.PlatformDrawer); } } }
public void LoadDiagram(IGraphData diagram) { InvertGraphEditor.DesignerWindow = this; if (diagram == null) { return; } try { DiagramDrawer = new DiagramDrawer(new DiagramViewModel(diagram)); DiagramDrawer.Dirty = true; //DiagramDrawer.Data.ApplyFilter(); DiagramDrawer.Refresh(InvertGraphEditor.PlatformDrawer); } catch (Exception ex) { InvertApplication.LogException(ex); InvertApplication.Log("Either a plugin isn't installed or the file could no longer be found. See Exception error"); } }