mirror of https://github.com/buggins/dlangide.git
fix breakpoint setting; add breakpoint toggle with left button click on editor line icons pane - close #95
This commit is contained in:
parent
25694f1bf5
commit
4aac13c19f
|
@ -222,6 +222,19 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
|
||||||
return super.handleAction(a);
|
return super.handleAction(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// left button click on icons panel: toggle breakpoint
|
||||||
|
override protected bool handleLeftPaneIconsMouseClick(MouseEvent event, Rect rc, int line) {
|
||||||
|
if (event.button == MouseButton.Left) {
|
||||||
|
LineIcon icon = content.lineIcons.findByLineAndType(line, LineIconType.breakpoint);
|
||||||
|
if (icon)
|
||||||
|
removeBreakpoint(line, icon);
|
||||||
|
else
|
||||||
|
addBreakpoint(line);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.handleLeftPaneIconsMouseClick(event, rc, line);
|
||||||
|
}
|
||||||
|
|
||||||
protected void addBreakpoint(int line) {
|
protected void addBreakpoint(int line) {
|
||||||
import std.path;
|
import std.path;
|
||||||
Breakpoint bp = new Breakpoint();
|
Breakpoint bp = new Breakpoint();
|
||||||
|
|
Loading…
Reference in New Issue