Skip to content

Commit

Permalink
Merge pull request #148 from utPLSQL/bugfix/issue-138-empty-utplsql-w…
Browse files Browse the repository at this point in the history
…indow

fixes #138 - avoid exception during UI initialization, check if a row is selected
  • Loading branch information
PhilippSalvisberg committed Feb 26, 2022
2 parents eabd8d1 + 9409c9a commit 2681298
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,12 @@ private void showSelectedRow() {
if (!showSuitesCheckBoxMenuItem.isSelected()) {
// table
final int rowIndex = testOverviewTable.getSelectedRow();
final int row = testOverviewTable.convertRowIndexToModel(rowIndex);
final Rectangle position = testOverviewTable
.getCellRect(testOverviewTable.convertRowIndexToView(row), 0, true);
testOverviewTable.scrollRectToVisible(position);
if (rowIndex != -1) {
final int row = testOverviewTable.convertRowIndexToModel(rowIndex);
final Rectangle position = testOverviewTable
.getCellRect(testOverviewTable.convertRowIndexToView(row), 0, true);
testOverviewTable.scrollRectToVisible(position);
}
} else {
// tree-table
TreePath path = testOverviewTreeTable.getTree().getSelectionPath();
Expand Down

0 comments on commit 2681298

Please sign in to comment.