mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
fixed #1117
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
Fixes:
|
||||
------
|
||||
#1117: Duplicate panel created when "Reconnect on Startup" and "Create Empty Panel" settings enabled
|
||||
#1115: Exception when changing from xml data storage to SQL
|
||||
#1110: Pressing Delete button during connection rename attempts to delete the connection instead of the text
|
||||
#1106: Inheritance does not work when parent has C# default type set
|
||||
|
||||
@@ -184,7 +184,10 @@ namespace mRemoteNG.UI.Forms
|
||||
var panelName = !string.IsNullOrEmpty(Settings.Default.StartUpPanelName)
|
||||
? Settings.Default.StartUpPanelName
|
||||
: Language.strNewPanel;
|
||||
new PanelAdder().AddPanel(panelName);
|
||||
|
||||
var panelAdder = new PanelAdder();
|
||||
if (!panelAdder.DoesPanelExist(panelName))
|
||||
panelAdder.AddPanel(panelName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
@@ -30,6 +31,12 @@ namespace mRemoteNG.UI.Panels
|
||||
}
|
||||
}
|
||||
|
||||
public bool DoesPanelExist(string panelName)
|
||||
{
|
||||
return Runtime.WindowList?.OfType<ConnectionWindow>().Any(w => w.TabText == panelName)
|
||||
?? false;
|
||||
}
|
||||
|
||||
private static void ShowConnectionWindow(ConnectionWindow connectionForm)
|
||||
{
|
||||
connectionForm.Show(FrmMain.Default.pnlDock, DockState.Document);
|
||||
|
||||
Reference in New Issue
Block a user