From b891465f2706dca734254bbc2fa4f938560af62c Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Sat, 10 Jan 2015 12:47:06 -0800 Subject: [PATCH] Turned off switching to gcode view (was confusing when switching queue items). --- MatterControlApplication.cs | 3 --- PartPreviewWindow/PartPreviewContent.cs | 18 ------------------ PartPreviewWindow/ViewGcodeBasic.cs | 13 ++++++------- SettingsManagement/UserSettingsFields.cs | 14 -------------- 4 files changed, 6 insertions(+), 42 deletions(-) diff --git a/MatterControlApplication.cs b/MatterControlApplication.cs index 62f223efb..e9d3166ec 100644 --- a/MatterControlApplication.cs +++ b/MatterControlApplication.cs @@ -198,9 +198,6 @@ namespace MatterHackers.MatterControl DesktopPosition = new Point2D(xpos, ypos); } - // make sure when we start up, we are not showing the 3D view - UserSettings.Instance.Fields.EmbededViewShowingGCode = false; - ShowAsSystemWindow(); } diff --git a/PartPreviewWindow/PartPreviewContent.cs b/PartPreviewWindow/PartPreviewContent.cs index ccc610825..584821c8b 100644 --- a/PartPreviewWindow/PartPreviewContent.cs +++ b/PartPreviewWindow/PartPreviewContent.cs @@ -153,24 +153,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } this.AddChild(tabControl); - - // if the embeded view was on the gcode tab than makes sure it stays there - if (UserSettings.Instance.Fields.EmbededViewShowingGCode) - { - SwitchToGcodeView(); - } - - tabControl.TabBar.TabIndexChanged += (sender, e) => - { - if (tabControl.TabBar.SelectedTabName == "Layer View Tab") - { - UserSettings.Instance.Fields.EmbededViewShowingGCode = true; - } - else - { - UserSettings.Instance.Fields.EmbededViewShowingGCode = false; - } - }; } public void SwitchToGcodeView() diff --git a/PartPreviewWindow/ViewGcodeBasic.cs b/PartPreviewWindow/ViewGcodeBasic.cs index fcefc0a76..b1e83057d 100644 --- a/PartPreviewWindow/ViewGcodeBasic.cs +++ b/PartPreviewWindow/ViewGcodeBasic.cs @@ -342,7 +342,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } else { - selectLayerSlider.Value = currentLayer-1; + selectLayerSlider.Value = currentLayer - 1; layerRenderRatioSlider.SecondValue = PrinterConnectionAndCommunication.Instance.RatioIntoCurrentLayer; layerRenderRatioSlider.FirstValue = 0; } @@ -651,9 +651,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { if (windowMode == WindowMode.Embeded) { - if (syncToPrint.Checked && - (PrinterConnectionAndCommunication.Instance.PrinterIsPaused - || PrinterConnectionAndCommunication.Instance.PrinterIsPrinting)) + bool printerIsRunningPrint = PrinterConnectionAndCommunication.Instance.PrinterIsPaused || PrinterConnectionAndCommunication.Instance.PrinterIsPrinting; + + if (syncToPrint.Checked && printerIsRunningPrint) { SetAnimationPosition(); //navigationWidget.Visible = false; @@ -729,11 +729,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow GuiWidget widgetThatHasKeyDownHooked = null; public override void OnDraw(Graphics2D graphics2D) { + bool printerIsRunningPrint = PrinterConnectionAndCommunication.Instance.PrinterIsPaused || PrinterConnectionAndCommunication.Instance.PrinterIsPrinting; if (syncToPrint != null && syncToPrint.Checked - && - (PrinterConnectionAndCommunication.Instance.PrinterIsPaused - || PrinterConnectionAndCommunication.Instance.PrinterIsPrinting)) + && printerIsRunningPrint) { SetAnimationPosition(); } diff --git a/SettingsManagement/UserSettingsFields.cs b/SettingsManagement/UserSettingsFields.cs index 472e2f404..a0aa79d3b 100644 --- a/SettingsManagement/UserSettingsFields.cs +++ b/SettingsManagement/UserSettingsFields.cs @@ -44,7 +44,6 @@ namespace MatterHackers.MatterControl string StartCountDurringExitKey = "StartCountDurringExit"; string IsSimpleModeKey = "IsSimpleMode"; - string EmbededViewShowingGCodeKey = "EmbededViewShowingGCode"; public bool IsSimpleMode { @@ -71,19 +70,6 @@ namespace MatterHackers.MatterControl set { SetInt(StartCountDurringExitKey, value); } } - public bool EmbededViewShowingGCode - { - get - { - return GetBool(EmbededViewShowingGCodeKey, false); - } - - set - { - SetBool(EmbededViewShowingGCodeKey, value); - } - } - public void SetBool(string keyToSet, bool value) { if (value)