Made the macro and gcode edit windows edit faster

This commit is contained in:
larsbrubaker 2016-12-03 12:48:19 -08:00
parent b64fc1d5c2
commit 1c9af30332
4 changed files with 10 additions and 1 deletions

View file

@ -84,6 +84,12 @@ namespace MatterHackers.MatterControl
get { return actuallTextEditWidget.InternalTextEditWidget.SelectAllOnFocus; }
set { actuallTextEditWidget.InternalTextEditWidget.SelectAllOnFocus = value; }
}
public void DrawFromHintedCache()
{
ActualTextEditWidget.Printer.DrawFromHintedCache = true;
ActualTextEditWidget.DoubleBuffer = false;
}
}
public class MHPasswordTextEditWidget : MHTextEditWidget

View file

@ -195,6 +195,7 @@ namespace MatterHackers.MatterControl
macroCommandLabel.Margin = new BorderDouble(0, 0, 0, 1);
macroCommandInput = new MHTextEditWidget(windowController.ActiveMacro.GCode, pixelHeight: 120, multiLine: true, typeFace: ApplicationController.MonoSpacedTypeFace);
macroCommandInput.DrawFromHintedCache();
macroCommandInput.HAnchor = HAnchor.ParentLeftRight;
macroCommandInput.VAnchor = VAnchor.ParentBottomTop;
macroCommandInput.ActualTextEditWidget.VAnchor = VAnchor.ParentBottomTop;

View file

@ -1234,6 +1234,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
HAnchor = HAnchor.ParentLeftRight,
};
stringEdit.DrawFromHintedCache();
stringEdit.ActualTextEditWidget.EditComplete += (sender, e) =>
{
ActiveSliceSettings.Instance.SetValue(settingData.SlicerConfigName, ((TextEditWidget)sender).Text.Replace("\n", "\\n"), persistenceLayer);

@ -1 +1 @@
Subproject commit a5460091153cc8a7862675fea54710f4b69f3341
Subproject commit e37124015adc9c3458e207542e4ccc8d1ca6e0cc