GP-1111 chnage create structure from components to adopt the pack

settings from its parent
This commit is contained in:
ghidra1 2021-07-16 13:19:52 -04:00
parent 3073904c0f
commit ac1c9d9018
2 changed files with 19 additions and 7 deletions

View file

@ -1216,11 +1216,13 @@ class StructureEditorModel extends CompEditorModel {
final StructureDataType structureDataType =
new StructureDataType(originalCategoryPath, uniqueName, length, originalDTM);
// if (isPackingEnabled()) {
// structureDataType.setPackingValue(getPackingValue());
// }
// adopt pack setting from current structure
structureDataType.setPackingEnabled(isPackingEnabled());
if (getPackingType() == PackingType.EXPLICIT) {
structureDataType.setExplicitPackingValue(getExplicitPackingValue());
}
// Get data type components to make into structure.
// Get data type components to make into structure.
DataTypeComponent firstDtc = null;
DataTypeComponent lastDtc = null;
for (int rowIndex = minRow; rowIndex < maxRow; rowIndex++) {