mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ui] disable dragging or resizing columns when table is empty
GitOrigin-RevId: 6d85cad3336b3e6f0585a4925245a91c0cb306ea
This commit is contained in:
committed by
intellij-monorepo-bot
parent
34c0fd2c38
commit
584d51bcac
@@ -1093,6 +1093,7 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component
|
||||
}
|
||||
|
||||
protected boolean canMoveOrResizeColumn(int modelIndex) {
|
||||
if (table.getRowCount() == 0) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1206,7 +1207,7 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component
|
||||
|
||||
@Override
|
||||
public void mouseMoved(@NotNull MouseEvent e) {
|
||||
if (isOnBorder(e)) return;
|
||||
if (isOnBorder(e) || header.getTable().getRowCount() == 0) return;
|
||||
mouseInputListener.mouseMoved(convertMouseEvent(e));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user