mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-06 00:25:25 +02:00
Bug 420604 - Disassembly view tends to scroll upwards on refresh
This commit is contained in:
parent
f70547c526
commit
79b3399977
1 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2012 Wind River Systems and others.
|
* Copyright (c) 2007, 2013 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -277,6 +277,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
private volatile int fUpdateCount;
|
private volatile int fUpdateCount;
|
||||||
private BigInteger fPCAddress;
|
private BigInteger fPCAddress;
|
||||||
private BigInteger fGotoAddressPending= PC_UNKNOWN;
|
private BigInteger fGotoAddressPending= PC_UNKNOWN;
|
||||||
|
private boolean fGotoAddressOnTop;
|
||||||
private BigInteger fFocusAddress= PC_UNKNOWN;
|
private BigInteger fFocusAddress= PC_UNKNOWN;
|
||||||
private int fBufferZone;
|
private int fBufferZone;
|
||||||
private String fDebugSessionId;
|
private String fDebugSessionId;
|
||||||
|
@ -1413,10 +1414,13 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
AddressRangePosition pos = getPositionOfAddress(address);
|
AddressRangePosition pos = getPositionOfAddress(address);
|
||||||
if (pos != null) {
|
if (pos != null) {
|
||||||
if (pos.fValid) {
|
if (pos.fValid) {
|
||||||
|
boolean onTop = false;
|
||||||
if (fGotoAddressPending.equals(address)) {
|
if (fGotoAddressPending.equals(address)) {
|
||||||
fGotoAddressPending = PC_UNKNOWN;
|
fGotoAddressPending = PC_UNKNOWN;
|
||||||
|
onTop = fGotoAddressOnTop;
|
||||||
|
fGotoAddressOnTop = false;
|
||||||
}
|
}
|
||||||
gotoPosition(pos, false);
|
gotoPosition(pos, onTop);
|
||||||
} else {
|
} else {
|
||||||
int lines = fBufferZone+3;
|
int lines = fBufferZone+3;
|
||||||
BigInteger endAddress = pos.fAddressOffset.add(pos.fAddressLength).min(
|
BigInteger endAddress = pos.fAddressOffset.add(pos.fAddressLength).min(
|
||||||
|
@ -2035,6 +2039,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
fTargetFrame = targetFrame;
|
fTargetFrame = targetFrame;
|
||||||
fFrameAddress = frameAddress;
|
fFrameAddress = frameAddress;
|
||||||
fPCAddress = pcAddress;
|
fPCAddress = pcAddress;
|
||||||
|
fGotoAddressOnTop = true;
|
||||||
gotoAddress(topAddress);
|
gotoAddress(topAddress);
|
||||||
} else {
|
} else {
|
||||||
refreshView((int)(refreshViewScheduled - now));
|
refreshView((int)(refreshViewScheduled - now));
|
||||||
|
|
Loading…
Add table
Reference in a new issue