提交 c8cf30be 编写于 作者: S serge-rider

#5379 Tabbed folders switch fix (traverse + alt)

上级 9b26ff1d
......@@ -1022,18 +1022,27 @@ public class TabbedFolderList extends Composite {
public void handleTraverse(TraverseEvent e) {
if (e.detail == SWT.TRAVERSE_PAGE_PREVIOUS || e.detail == SWT.TRAVERSE_PAGE_NEXT) {
if ((e.stateMask & SWT.ALT) != SWT.ALT) {
// Only in case of CTRL+ALT+PG
return;
}
e.doit = false;
int nMax = elements.length - 1;
int nCurrent = getSelectionIndex();
if (e.detail == SWT.TRAVERSE_PAGE_PREVIOUS) {
nCurrent -= 1;
nCurrent = Math.max(0, nCurrent);
if (nCurrent < 0) {
return;
}
} else {
nCurrent += 1;
nCurrent = Math.min(nCurrent, nMax);
if (nCurrent > nMax) {
return;
}
}
select(nCurrent);
redraw();
e.doit = false;
} else {
e.doit = true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册