mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 412949 - Double clicking in Disassembly leaks a listener
This commit is contained in:
parent
f33ded195a
commit
8b12c2d474
1 changed files with 15 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2009 Wind River Systems, Inc. and others.
|
* Copyright (c) 2009, 2013 Wind River Systems, Inc. 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
|
||||||
|
@ -38,6 +38,7 @@ public class RulerToggleBreakpointHandler extends AbstractHandler {
|
||||||
final IVerticalRulerInfo rulerInfo= (IVerticalRulerInfo) part.getAdapter(IVerticalRulerInfo.class);
|
final IVerticalRulerInfo rulerInfo= (IVerticalRulerInfo) part.getAdapter(IVerticalRulerInfo.class);
|
||||||
if (rulerInfo != null) {
|
if (rulerInfo != null) {
|
||||||
final ToggleBreakpointAction toggleBpAction= new ToggleBreakpointAction(part, document, rulerInfo);
|
final ToggleBreakpointAction toggleBpAction= new ToggleBreakpointAction(part, document, rulerInfo);
|
||||||
|
try {
|
||||||
toggleBpAction.update();
|
toggleBpAction.update();
|
||||||
if (toggleBpAction.isEnabled()) {
|
if (toggleBpAction.isEnabled()) {
|
||||||
if (event.getTrigger() instanceof Event) {
|
if (event.getTrigger() instanceof Event) {
|
||||||
|
@ -49,6 +50,9 @@ public class RulerToggleBreakpointHandler extends AbstractHandler {
|
||||||
toggleBpAction.run();
|
toggleBpAction.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
toggleBpAction.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue