mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-30 08:04:38 +00:00
Reset options only on id change
This commit is contained in:
parent
b2853d40f3
commit
bf7412b86a
@ -2051,6 +2051,7 @@ public class ProgramDB extends DomainObjectAdapterDB implements Program, ChangeM
|
||||
setEventsEnabled(false);
|
||||
try {
|
||||
boolean redisassemblyRequired = true;
|
||||
LanguageID oldLanguageId = languageID;
|
||||
int oldLanguageVersion = languageVersion;
|
||||
int oldLanguageMinorVersion = languageMinorVersion;
|
||||
if (translator != null) {
|
||||
@ -2079,8 +2080,11 @@ public class ProgramDB extends DomainObjectAdapterDB implements Program, ChangeM
|
||||
if (newCompilerSpecID != null) {
|
||||
compilerSpec = ProgramCompilerSpec.getProgramCompilerSpec(this,
|
||||
language.getCompilerSpecByID(newCompilerSpecID));
|
||||
if (compilerSpec instanceof ProgramCompilerSpec) {
|
||||
((ProgramCompilerSpec) compilerSpec).resetProgramOptions(monitor);
|
||||
if (!oldLanguageId.equals(languageID) ||
|
||||
!compilerSpecID.equals(newCompilerSpecID)) {
|
||||
if (compilerSpec instanceof ProgramCompilerSpec) {
|
||||
((ProgramCompilerSpec) compilerSpec).resetProgramOptions(monitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
compilerSpecID = compilerSpec.getCompilerSpecID();
|
||||
|
Loading…
Reference in New Issue
Block a user