diff --git a/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.cs b/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.cs index 0fd47f3ff3..8417d1591e 100644 --- a/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.cs +++ b/ConnectorRhino/ConnectorRhino/ConnectorRhinoShared/UI/ConnectorBindingsRhino.cs @@ -1163,6 +1163,9 @@ public override async Task Open3DView(List viewCoordinates, string viewN { // Get bounds from active view Rectangle bounds = Doc.Views.ActiveView.ScreenRectangle; + // Reset margins + bounds.X = 0; + bounds.Y = 0; Doc.Views.Add("SpeckleCommentView", DefinedViewportProjection.Perspective, bounds, false); } @@ -1174,13 +1177,23 @@ await Task.Run(() => RhinoView speckleCommentView = views.First(); speckleCommentView.ActiveViewport.SetCameraDirection(direction, false); speckleCommentView.ActiveViewport.SetCameraLocation(cameraLocation, true); - speckleCommentView.Maximized = true; + DisplayModeDescription shaded = DisplayModeDescription.FindByName("Shaded"); if (shaded!= null) { speckleCommentView.ActiveViewport.DisplayMode = shaded; } + // Minimized all maximized views. + IEnumerable maximizedViews = Doc.Views.Where(v => v.Maximized); + foreach (RhinoView view in maximizedViews) + { + view.Maximized = false; + } + + // Maximized speckle comment view. + speckleCommentView.Maximized = true; + if (Doc.Views.ActiveView.ActiveViewport.Name != "SpeckleCommentView") { Doc.Views.ActiveView = speckleCommentView;