GP-4835: Fix stale Force Full View toggle.

This commit is contained in:
Dan 2024-08-21 14:27:53 -04:00
parent 6a94f1f7ab
commit 611399a110
2 changed files with 9 additions and 11 deletions

View File

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -294,7 +294,6 @@ public class DebuggerLegacyRegionsPanel extends JPanel {
currentTrace = trace;
addNewListeners();
loadRegions();
contextChanged();
}
public void contextChanged() {

View File

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -537,12 +537,9 @@ public class DebuggerRegionsProvider extends ComponentProviderAdapter {
@Override
public void contextChanged() {
super.contextChanged();
if (current.getTrace() != null) {
actionForceFullView.setSelected(current.getTrace()
.getProgramView()
.getMemory()
.isForceFullView());
}
Trace trace = current.getTrace();
actionForceFullView.setSelected(trace == null ? false
: trace.getProgramView().getMemory().isForceFullView());
}
public Entry<Program, MemoryBlock> askBlock(TraceMemoryRegion region, Program program,
@ -581,5 +578,7 @@ public class DebuggerRegionsProvider extends ComponentProviderAdapter {
mainPanel.validate();
}
}
contextChanged();
}
}