mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-5391 Correct manner in which BuiltIn datatype default settings are
conveyed to DataTypeSettingsDB instance.
This commit is contained in:
parent
ce6770132b
commit
1505725e36
1 changed files with 3 additions and 7 deletions
|
@ -2883,15 +2883,11 @@ abstract public class DataTypeManagerDB implements DataTypeManager {
|
||||||
|
|
||||||
if (allowsDefaultBuiltInSettings() &&
|
if (allowsDefaultBuiltInSettings() &&
|
||||||
builtInDt.getSettingsDefinitions().length != 0) {
|
builtInDt.getSettingsDefinitions().length != 0) {
|
||||||
|
// Alter built-in datatype instance to use new DB-backed default settings which
|
||||||
|
// facilitates user adjustments to the original default settings.
|
||||||
DataTypeSettingsDB settings =
|
DataTypeSettingsDB settings =
|
||||||
new DataTypeSettingsDB(this, builtInDt, dataTypeID);
|
new DataTypeSettingsDB(this, builtInDt, dataTypeID);
|
||||||
if (builtInDt instanceof TypeDef) {
|
settings.setDefaultSettings(builtInDt.getDefaultSettings());
|
||||||
// Copy default immutable builtin typedef settings
|
|
||||||
Settings typedefSettings = builtInDt.getDefaultSettings();
|
|
||||||
for (String n : typedefSettings.getNames()) {
|
|
||||||
settings.setValue(n, typedefSettings.getValue(n));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
settings.setAllowedSettingPredicate(n -> isBuiltInSettingAllowed(builtInDt, n));
|
settings.setAllowedSettingPredicate(n -> isBuiltInSettingAllowed(builtInDt, n));
|
||||||
builtInDt.setDefaultSettings(settings);
|
builtInDt.setDefaultSettings(settings);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue