mirror of https://github.com/rusefi/RomRaider.git
Editor Toolbar Updates:
- Fix for unnecessary table toolbar refresh when the user click on another cell in the same table. - Fix for issue where table toolbar does not update when using arrow keys to move from the table to the header.
This commit is contained in:
parent
b6f5ba6a92
commit
85e7087a95
|
@ -1019,6 +1019,7 @@ public abstract class Table extends JPanel implements Serializable {
|
|||
clearSelection();
|
||||
data[y].setSelected(true);
|
||||
highlightY = y;
|
||||
ECUEditorManager.getECUEditor().getTableToolBar().updateTableToolBar(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -596,6 +596,7 @@ public class Table3D extends Table {
|
|||
} else { // y axis
|
||||
selectCellAt(y, 0);
|
||||
}
|
||||
ECUEditorManager.getECUEditor().getTableToolBar().updateTableToolBar(this);
|
||||
}
|
||||
|
||||
public void deSelectCellAt(int x, int y) {
|
||||
|
|
|
@ -305,6 +305,16 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
|||
}
|
||||
|
||||
public void updateTableToolBar(Table selectedTable) {
|
||||
if(selectedTable == null && this.selectedTable == null) {
|
||||
// Skip if the table is the same to avoid multiple updates
|
||||
return;
|
||||
} else if(selectedTable == null || this.selectedTable == null) {
|
||||
// Update the toolbar.
|
||||
} else if(this.selectedTable.equals(selectedTable)) {
|
||||
// Skip if the table is the same to avoid multiple updates
|
||||
return;
|
||||
}
|
||||
|
||||
this.selectedTable = selectedTable;
|
||||
|
||||
setBorder(toolbarBorder);
|
||||
|
|
Loading…
Reference in New Issue