GP-771 - fixed regression that caused table header popup to stop working

This commit is contained in:
dragonmacher 2021-03-12 16:06:30 -05:00
parent f2e702d1b2
commit b929183180

View file

@ -151,6 +151,10 @@ public class DockableComponent extends JPanel implements ContainerListener {
} }
private void showContextMenu(MouseEvent e) { private void showContextMenu(MouseEvent e) {
if (e.isConsumed()) {
return;
}
Component component = e.getComponent(); Component component = e.getComponent();
if (component == null) { if (component == null) {
return; // not sure this can happen return; // not sure this can happen
@ -190,7 +194,7 @@ public class DockableComponent extends JPanel implements ContainerListener {
/** /**
* Returns the component provider attached to this dockable component; null if this object * Returns the component provider attached to this dockable component; null if this object
* has been disposed * has been disposed
* *
* @return the provider * @return the provider
*/ */
public ComponentProvider getComponentProvider() { public ComponentProvider getComponentProvider() {
@ -255,7 +259,7 @@ public class DockableComponent extends JPanel implements ContainerListener {
public synchronized void dragEnter(DropTargetDragEvent dtde) { public synchronized void dragEnter(DropTargetDragEvent dtde) {
super.dragEnter(dtde); super.dragEnter(dtde);
// On Mac, sometimes this component is not showing, // On Mac, sometimes this component is not showing,
// which causes exception in the translate method. // which causes exception in the translate method.
if (!isShowing()) { if (!isShowing()) {
dtde.rejectDrag(); dtde.rejectDrag();
@ -278,7 +282,7 @@ public class DockableComponent extends JPanel implements ContainerListener {
public synchronized void dragOver(DropTargetDragEvent dtde) { public synchronized void dragOver(DropTargetDragEvent dtde) {
super.dragOver(dtde); super.dragOver(dtde);
// On Mac, sometimes this component is not showing, // On Mac, sometimes this component is not showing,
// which causes exception in the translate method. // which causes exception in the translate method.
if (!isShowing()) { if (!isShowing()) {
dtde.rejectDrag(); dtde.rejectDrag();
@ -457,7 +461,7 @@ public class DockableComponent extends JPanel implements ContainerListener {
private void componentSelected(Component component) { private void componentSelected(Component component) {
if (!component.isFocusable()) { if (!component.isFocusable()) {
// In this case, Java will not change focus for us, so we need to tell the DWM to // In this case, Java will not change focus for us, so we need to tell the DWM to
// change the active DockableComponent // change the active DockableComponent
requestFocus(); requestFocus();
} }