Due to an issue where Project Information fields were saving in cases where the user did not click "OK" (dialog close, field editing, etc),
the following changes have been made in ProjectInformationDialog
.
saveInfo
fieldbool update
(default: true) parameterupdateDependent
function, passing in the update
parameter/** * Text content changed. */ extend public void textContentChanged(Control c, bool update=true) { ... Old: for (depKey in dependentKeys(key)) updateDependent(key, depKey, val); New: for (depKey in dependentKeys(key)) updateDependent(key, depKey, val, update=update); }
updateDependent
function, passing in the update
parameter/** * Check box changed. * To be done in child class. */ extend public void enableSelected(Control control, bool update=true) { if (!world or !control.visible) return; if (control as CheckBox) { ... Old: for (depKey in dependentKeys(key)) updateDependent(key, depKey, val); New: for (depKey in dependentKeys(key)) updateDependent(key, depKey, val, update); } else { ... } }
saveInfo
back to default false value after close saveInfo
to false before calling super()
Text fields created in this function (FormattedTextField
) now set the enterKeyCallback
parameter to contentChangedCB
rather than applyCB
Old:
FormattedTextField
s used applyCB
as their enter-key callbackapplyCB
called window.apply()
, automatically applying changes to the world cached project information objectNew
FormattedTextField
s now use contentChangedCB
as their enter-key callbackProjectInformationDialog
should now only update the world cached ProjectInformation
when the user selects "OK" in the dialogDate fields created in this function (DateField
) now set the callback
parameter to contentChangedCB
rather than applyCB
Old:
DateField
s used applyCB
as their callbackapplyCB
called window.apply()
, automatically applying changes to the world cached project information objectNew
DateField
s now use contentChangedCB
as their callbackProjectInformationDialog
should now only update the world cached ProjectInformation
when the user selects "OK" in the dialogwindow.textContentChanged()
with update
parameter set to falseOld:
window.textContentChanged
with update
parameter set to default (true)contentChangedCB
callback would automatically update the world cached project informationNew:
window.textContentChanged
with update
parameter set to falsecontentChangedCB
callback do not update world project information automaticallyProjectInformationDialog
should now only update the world cached ProjectInformation
when the user selects "OK" in the dialog/** * Text area content changed callback */ private void contentChangedCB(Control control) { Window window = control.parentFrame; if (window as ProjectInformationDialog and control.visible) { Old: window.textContentChanged(control); New: window.textContentChanged(control, update=false); } }
Now calls window.enableSelected()
with update
parameter set to false
Old:
window.enableSelected
with update
parameter set to default (true)checkBoxContentChangedCB
callback would automatically update the world cached project informationNew:
window.enableSelected
with update
parameter set to falsecheckBoxContentChangedCB
callback do not update world project information automaticallyProjectInformationDialog
should now only update the world cached ProjectInformation
when the user selects "OK" in the dialog/** * Check Box content changed callback. */ private void checkBoxContentChangedCB(Control c) { Window window = c.parentFrame; if (window as ProjectInformationDialog and c.validAndVisible) { Old: window.enableSelected(c); New: window.enableSelected(c, update=false); } }