Fix Tool Tip not following row item when parameter list is sorted differently

This commit is contained in:
Dale Schultz 2019-01-09 20:31:16 -05:00
parent f0f0d8c7f7
commit 575d8a2921
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* /*
* RomRaider Open-Source Tuning, Logging and Reflashing * RomRaider Open-Source Tuning, Logging and Reflashing
* Copyright (C) 2006-2012 RomRaider.com * Copyright (C) 2006-2019 RomRaider.com
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -72,7 +72,9 @@ public final class ParameterListTable extends JTable {
public String getToolTipText(MouseEvent mouseEvent) { public String getToolTipText(MouseEvent mouseEvent) {
List<ParameterRow> parameterRows = tableModel.getParameterRows(); List<ParameterRow> parameterRows = tableModel.getParameterRows();
if (!isNullOrEmpty(parameterRows)) { if (!isNullOrEmpty(parameterRows)) {
ParameterRow parameterRow = parameterRows.get(rowAtPoint(mouseEvent.getPoint())); ParameterRow parameterRow = parameterRows.get(
convertRowIndexToModel(
rowAtPoint(mouseEvent.getPoint())));
if (parameterRow != null) { if (parameterRow != null) {
String description = parameterRow.getLoggerData().getDescription(); String description = parameterRow.getLoggerData().getDescription();
if (!isNullOrEmpty(description)) { if (!isNullOrEmpty(description)) {