Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Exception when resetting layout #1447

@sparerd

Description

@sparerd

Expected Behavior

The Reset Layout function should work regardless of the current configuration of windows.

Current Behavior

When the connections or config windows are dock-filled in the app and the Reset Layout menu option is clicked, an exception occurs. The windows are now in an inconsistent state and the app must be restarted to bring them back.

Steps to Reproduce (for bugs)

  1. Move either config or connections windows to dock-fill in the app
  2. View -> Reset Layout
  3. Exception occurs

spVml9rDyy

Context

Exception Message
"Invalid Value: The value of DockAreas conflicts with current DockState."

Stack trace
   at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockAreas(DockAreas value)
   at WeifenLuo.WinFormsUI.Docking.DockContent.set_DockAreas(DockAreas value)
   at mRemoteNG.UI.Forms.FrmMain.SetDefaultLayout() in C:\jenkins\workspace\Publish\Build mRemoteNG for Release\mRemoteV1\UI\Forms\FrmMain.cs:line 696
   at mRemoteNG.UI.Menu.ViewMenu.mMenViewResetLayout_Click(Object sender, EventArgs e) in C:\jenkins\workspace\Publish\Build mRemoteNG for Release\mRemoteV1\UI\Menu\ViewMenu.cs:line 357
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Environment
OS: Microsoft Windows NT 10.0.17134.0
mRemoteNG Version: 1.77.0.41252
Edition: MSI
Cmd line args: 

Your Environment

  • Version used: v1.77.0 (current develop branch)
  • Operating System and version (e.g. Windows 10 1709 x64):

Metadata

Metadata

Assignees

Labels

BugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions