mirror of
https://github.com/NationalSecurityAgency/ghidra
synced 2024-08-28 13:30:21 +00:00
GP-2173 - fixed undo closing an unsaved data type editor window
This commit is contained in:
parent
fa09ee612a
commit
e478ea4e93
|
@ -358,14 +358,21 @@ public class DataTypeEditorManager
|
|||
DataTypeManager dataTypeManager = editor.getDataTypeManager();
|
||||
DataTypeManager programDataTypeManager = domainObject.getDataTypeManager();
|
||||
if (dataTypeManager == programDataTypeManager) {
|
||||
DataTypePath dtPath = editor.getDtPath();
|
||||
CategoryPath categoryPath = dtPath.getCategoryPath();
|
||||
String name = dtPath.getDataTypeName();
|
||||
DataType dataType = programDataTypeManager.getDataType(categoryPath, name);
|
||||
if (dataType == null || dataType.isDeleted()) {
|
||||
dismissEditor(editor);
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
|
||||
It is not clear why this check was added. It seem reasonable to always let the
|
||||
editor know about the event. With this code enabled, editors with new, unsaved
|
||||
types will be closed.
|
||||
|
||||
DataTypePath dtPath = editor.getDtPath();
|
||||
CategoryPath categoryPath = dtPath.getCategoryPath();
|
||||
String name = dtPath.getDataTypeName();
|
||||
DataType dataType = programDataTypeManager.getDataType(categoryPath, name);
|
||||
if (dataType == null || dataType.isDeleted()) {
|
||||
dismissEditor(editor);
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
editor.domainObjectRestored(domainObject);
|
||||
}
|
||||
}
|
||||
|
@ -519,8 +526,8 @@ public class DataTypeEditorManager
|
|||
PluginTool tool = plugin.getTool();
|
||||
DTMEditFunctionSignatureDialog editSigDialog = new DTMEditFunctionSignatureDialog(
|
||||
plugin.getTool(), "Edit Function Signature", category, functionDefinition);
|
||||
editSigDialog.setHelpLocation(
|
||||
new HelpLocation("DataTypeManagerPlugin", "Function_Definition"));
|
||||
editSigDialog
|
||||
.setHelpLocation(new HelpLocation("DataTypeManagerPlugin", "Function_Definition"));
|
||||
tool.showDialog(editSigDialog);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue