Make the 'install update' from the windowed about page still close MC>
This commit is contained in:
parent
1395676fe4
commit
570fe3a3ee
2 changed files with 3 additions and 8 deletions
|
|
@ -393,7 +393,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public static EventHandler InstallUpdateFromMainActivity = null;
|
||||
|
||||
public bool InstallUpdate(GuiWidget windowToClose)
|
||||
public bool InstallUpdate()
|
||||
{
|
||||
string downloadToken = ApplicationSettings.Instance.get("CurrentBuildToken");
|
||||
|
||||
|
|
@ -432,13 +432,8 @@ namespace MatterHackers.MatterControl
|
|||
installUpdate.StartInfo.FileName = friendlyFileName;
|
||||
installUpdate.Start();
|
||||
|
||||
while (windowToClose != null && windowToClose as SystemWindow == null)
|
||||
{
|
||||
windowToClose = windowToClose.Parent;
|
||||
}
|
||||
|
||||
//Attempt to close current application
|
||||
SystemWindow topSystemWindow = windowToClose as SystemWindow;
|
||||
SystemWindow topSystemWindow = MatterControlApplication.Instance as SystemWindow;
|
||||
if (topSystemWindow != null)
|
||||
{
|
||||
topSystemWindow.CloseOnIdle();
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!UpdateControlData.Instance.InstallUpdate(this))
|
||||
if (!UpdateControlData.Instance.InstallUpdate())
|
||||
{
|
||||
installUpdateLink.Visible = false;
|
||||
updateStatusText.Text = string.Format("Oops! Unable to install update.".Localize());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue