Backport onload event from scene_bundle
This commit is contained in:
parent
208d9b334a
commit
9f01abe653
8 changed files with 44 additions and 75 deletions
|
|
@ -106,15 +106,10 @@ namespace MatterHackers.MatterControl
|
|||
ShowAsSystemWindow();
|
||||
}
|
||||
|
||||
bool firstDraw = true;
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
if (firstDraw)
|
||||
{
|
||||
UiThread.RunOnIdle(folderNameWidget.Focus);
|
||||
firstDraw = false;
|
||||
}
|
||||
base.OnDraw(graphics2D);
|
||||
UiThread.RunOnIdle(folderNameWidget.Focus);
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
private void ActualTextEditWidget_EnterPressed(object sender, KeyEventArgs keyEvent)
|
||||
|
|
|
|||
|
|
@ -127,20 +127,14 @@ namespace MatterHackers.MatterControl
|
|||
ShowAsSystemWindow();
|
||||
}
|
||||
|
||||
bool firstDraw = true;
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
if (firstDraw)
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
saveAsNameWidget.Focus();
|
||||
saveAsNameWidget.ActualTextEditWidget.InternalTextEditWidget.SelectAll();
|
||||
});
|
||||
|
||||
firstDraw = false;
|
||||
}
|
||||
base.OnDraw(graphics2D);
|
||||
saveAsNameWidget.Focus();
|
||||
saveAsNameWidget.ActualTextEditWidget.InternalTextEditWidget.SelectAll();
|
||||
});
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
private void ActualTextEditWidget_EnterPressed(object sender, KeyEventArgs keyEvent)
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ namespace MatterHackers.MatterControl
|
|||
private string confirmExit = "Confirm Exit".Localize();
|
||||
private bool DoCGCollectEveryDraw = false;
|
||||
private int drawCount = 0;
|
||||
private bool firstDraw = true;
|
||||
private AverageMillisecondTimer millisecondTimer = new AverageMillisecondTimer();
|
||||
private DataViewGraph msGraph;
|
||||
private string savePartsSheetExitAnywayMessage = "You are currently saving a parts sheet, are you sure you want to exit?".Localize();
|
||||
|
|
@ -634,22 +633,25 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
|
||||
if (firstDraw)
|
||||
//msGraph.AddData("ms", totalDrawTime.ElapsedMilliseconds);
|
||||
//msGraph.Draw(MatterHackers.Agg.Transform.Affine.NewIdentity(), graphics2D);
|
||||
}
|
||||
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
foreach (string arg in commandLineArgs)
|
||||
{
|
||||
firstDraw = false;
|
||||
foreach (string arg in commandLineArgs)
|
||||
string argExtension = Path.GetExtension(arg).ToUpper();
|
||||
if (argExtension.Length > 1
|
||||
&& MeshFileIo.ValidFileExtensions().Contains(argExtension))
|
||||
{
|
||||
string argExtension = Path.GetExtension(arg).ToUpper();
|
||||
if (argExtension.Length > 1
|
||||
&& MeshFileIo.ValidFileExtensions().Contains(argExtension))
|
||||
{
|
||||
QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(Path.GetFileName(arg), Path.GetFullPath(arg))));
|
||||
}
|
||||
QueueData.Instance.AddItem(new PrintItemWrapper(new PrintItem(Path.GetFileName(arg), Path.GetFullPath(arg))));
|
||||
}
|
||||
}
|
||||
|
||||
TerminalWindow.ShowIfLeftOpen();
|
||||
TerminalWindow.ShowIfLeftOpen();
|
||||
|
||||
ApplicationController.Instance.OnLoadActions();
|
||||
ApplicationController.Instance.OnLoadActions();
|
||||
|
||||
#if false
|
||||
{
|
||||
|
|
@ -668,10 +670,6 @@ namespace MatterHackers.MatterControl
|
|||
}, 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//msGraph.AddData("ms", totalDrawTime.ElapsedMilliseconds);
|
||||
//msGraph.Draw(MatterHackers.Agg.Transform.Affine.NewIdentity(), graphics2D);
|
||||
}
|
||||
|
||||
public override void OnMouseMove(MouseEventArgs mouseEvent)
|
||||
|
|
|
|||
|
|
@ -160,19 +160,14 @@ namespace MatterHackers.MatterControl
|
|||
saveAsButton.Enabled = true;
|
||||
}
|
||||
|
||||
bool firstDraw = true;
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
if (firstDraw)
|
||||
if (textToAddWidget != null
|
||||
&& !UserSettings.Instance.IsTouchScreen)
|
||||
{
|
||||
if (textToAddWidget != null
|
||||
&& !UserSettings.Instance.IsTouchScreen)
|
||||
{
|
||||
UiThread.RunOnIdle(textToAddWidget.Focus);
|
||||
}
|
||||
firstDraw = false;
|
||||
UiThread.RunOnIdle(textToAddWidget.Focus);
|
||||
}
|
||||
base.OnDraw(graphics2D);
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
private void ActualTextEditWidget_EnterPressed(object sender, KeyEventArgs keyEvent)
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
private CheckBox expandViewOptions;
|
||||
private ExportPrintItemWindow exportingWindow = null;
|
||||
private ObservableCollection<GuiWidget> extruderButtons = new ObservableCollection<GuiWidget>();
|
||||
private bool firstDraw = true;
|
||||
private bool hasDrawn = false;
|
||||
private FlowLayoutWidget materialOptionContainer;
|
||||
public List<PlatingMeshGroupData> MeshGroupExtraData { get; private set; }
|
||||
|
|
@ -837,14 +836,14 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
base.OnDragOver(fileDropEventArgs);
|
||||
}
|
||||
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
ClearBedAndLoadPrintItemWrapper(printItemWrapper);
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
{
|
||||
if (firstDraw)
|
||||
{
|
||||
ClearBedAndLoadPrintItemWrapper(printItemWrapper);
|
||||
firstDraw = false;
|
||||
}
|
||||
|
||||
if (HaveSelection)
|
||||
{
|
||||
foreach (InteractionVolume volume in meshViewerWidget.interactionVolumes)
|
||||
|
|
|
|||
|
|
@ -207,20 +207,14 @@ namespace MatterHackers.MatterControl
|
|||
FileDialog.SaveFileDialog(saveParams, onExportLogFileSelected);
|
||||
}
|
||||
|
||||
private bool firstDraw = true;
|
||||
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
{
|
||||
#if !__ANDROID__
|
||||
if (firstDraw)
|
||||
{
|
||||
filterOutput.Checked = UserSettings.Instance.Fields.GetBool(TerminalFilterOutputKey, false);
|
||||
firstDraw = false;
|
||||
UiThread.RunOnIdle(manualCommandTextEdit.Focus);
|
||||
}
|
||||
#endif
|
||||
base.OnDraw(graphics2D);
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
filterOutput.Checked = UserSettings.Instance.Fields.GetBool(TerminalFilterOutputKey, false);
|
||||
UiThread.RunOnIdle(manualCommandTextEdit.Focus);
|
||||
base.OnLoad(args);
|
||||
}
|
||||
#endif
|
||||
|
||||
readonly static string writeFaildeWaring = "WARNING: Write Failed!".Localize();
|
||||
readonly static string cantAccessPath = "Can't access '{0}'.".Localize();
|
||||
|
|
|
|||
|
|
@ -371,16 +371,10 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private bool firstDraw = true;
|
||||
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
if (firstDraw)
|
||||
{
|
||||
firstDraw = false;
|
||||
EnsureSelection();
|
||||
}
|
||||
base.OnDraw(graphics2D);
|
||||
EnsureSelection();
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
public override void OnClosed(EventArgs e)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 710cefe4888ea6e48c56455dcc0a81a79f4cb663
|
||||
Subproject commit 5fe3ead0688e35778c48e037209d60c1f1d08f34
|
||||
Loading…
Add table
Add a link
Reference in a new issue