Made the centering of inserted parts work correctly.

Always show the reset connection button if a printer has it, even when not connected.
This commit is contained in:
Lars Brubaker 2015-03-12 14:36:42 -07:00
parent e748b2683f
commit 4ef9e4c0fc
4 changed files with 20 additions and 43 deletions

View file

@ -34,7 +34,6 @@ namespace MatterHackers.MatterControl.ActionBar
TooltipButton resumeButton;
TooltipButton cancelButton;
TooltipButton resetConnectionButton;
TooltipButton reprintButton;
TooltipButton doneWithCurrentPartButton;
@ -90,10 +89,6 @@ namespace MatterHackers.MatterControl.ActionBar
string cancelButtonMessage = LocalizedString.Get("Stop the current print");
cancelButton = makeButton(cancelButtonText, cancelButtonMessage);
string resetConnectionButtonText = "Reset Connection".Localize();
string resetConnectionButtonMessage = "Reboots the firmware on the controller".Localize();
resetConnectionButton = makeButton(resetConnectionButtonText, resetConnectionButtonMessage);
string resumeButtonText = LocalizedString.Get("Resume");
string resumeButtonMessage = LocalizedString.Get ("Resume the current print");
resumeButton = makeButton(resumeButtonText, resumeButtonMessage);
@ -127,9 +122,6 @@ namespace MatterHackers.MatterControl.ActionBar
this.AddChild(cancelButton);
allPrintButtons.Add(cancelButton);
this.AddChild(resetConnectionButton);
allPrintButtons.Add(resetConnectionButton);
this.AddChild(cancelConnectButton);
allPrintButtons.Add(cancelConnectButton);
@ -155,7 +147,6 @@ namespace MatterHackers.MatterControl.ActionBar
pauseButton.Click += new EventHandler(onPauseButton_Click);
cancelButton.Click += (sender, e) => { UiThread.RunOnIdle(CancelButton_Click); };
resetConnectionButton.Click += (sender, e) => { UiThread.RunOnIdle(ResetConnectionButton_Click); };
cancelConnectButton.Click += (sender, e) => { UiThread.RunOnIdle(CancelConnectionButton_Click); };
reprintButton.Click += new EventHandler(onReprintButton_Click);
doneWithCurrentPartButton.Click += new EventHandler(onDoneWithCurrentPartButton_Click);
@ -385,10 +376,6 @@ namespace MatterHackers.MatterControl.ActionBar
this.activePrintButtons.Add(pauseButton);
this.activePrintButtons.Add(cancelButton);
}
else
{
this.activePrintButtons.Add(resetConnectionButton);
}
EnableActiveButtons();
break;