private void EntityScaleZTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) { return; } if (CurrentEntity == null) { return; } float sz = 0; FloatUtil.TryParse(EntityScaleZTextBox.Text, out sz); lock (ProjectForm.ProjectSyncRoot) { if (CurrentEntity.Scale.Z != sz) { Vector3 newscale = new Vector3(CurrentEntity.Scale.X, CurrentEntity.Scale.Y, sz); CurrentEntity.SetScale(newscale); ProjectItemChanged(); var wf = ProjectForm.WorldForm; if (wf != null) { wf.BeginInvoke(new Action(() => { wf.SetWidgetScale(newscale, true); })); } } } }