mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-169924 / IDEA-166147 Middle click on breadcrumbs bar navigates to whatever is under the caret
This commit is contained in:
@@ -47,6 +47,8 @@ import java.util.function.Function;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.border.AbstractBorder;
|
||||
|
||||
import static javax.swing.SwingUtilities.isLeftMouseButton;
|
||||
|
||||
/**
|
||||
* @author Sergey.Malenkov
|
||||
*/
|
||||
@@ -416,6 +418,7 @@ public class Breadcrumbs extends JComponent implements RegionPainter<Crumb> {
|
||||
if (!isHovered(crumb)) consumer = hover;
|
||||
break;
|
||||
case MouseEvent.MOUSE_CLICKED:
|
||||
if (!isLeftMouseButton(event)) break;
|
||||
crumb = function.apply(event);
|
||||
if (crumb != null) consumer = select;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user