mirror of
https://github.com/Wisser/Jailer.git
synced 2026-05-16 19:38:39 -05:00
added exception handler
This commit is contained in:
@@ -876,16 +876,20 @@ public class DbConnectionDialog extends javax.swing.JDialog {
|
||||
}
|
||||
});
|
||||
if (connectionsTable != null) {
|
||||
if (sci != null) {
|
||||
int selectedRowIndex = connectionList.indexOf(sci);
|
||||
if (selectedRowIndex >= 0) {
|
||||
RowSorter<?> rowSorter = connectionsTable.getRowSorter();
|
||||
selectedRowIndex = rowSorter.convertRowIndexToView(selectedRowIndex);
|
||||
try {
|
||||
if (sci != null) {
|
||||
int selectedRowIndex = connectionList.indexOf(sci);
|
||||
if (selectedRowIndex >= 0) {
|
||||
connectionsTable.getSelectionModel().setSelectionInterval(selectedRowIndex, selectedRowIndex);
|
||||
connectionsTable.scrollRectToVisible(connectionsTable.getCellRect(selectedRowIndex, 0, true));
|
||||
RowSorter<?> rowSorter = connectionsTable.getRowSorter();
|
||||
selectedRowIndex = rowSorter.convertRowIndexToView(selectedRowIndex);
|
||||
if (selectedRowIndex >= 0) {
|
||||
connectionsTable.getSelectionModel().setSelectionInterval(selectedRowIndex, selectedRowIndex);
|
||||
connectionsTable.scrollRectToVisible(connectionsTable.getCellRect(selectedRowIndex, 0, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -2151,7 +2152,7 @@ public class ExtractionModelFrame extends javax.swing.JFrame {
|
||||
|
||||
extractionModelEditor.graphView.exportDisplayToImage(overviewImg, overviewHtml);
|
||||
|
||||
renderer.setOverviewHtml(Files.readAllLines(overviewHtml.toPath()).stream().collect(Collectors.joining(UIUtil.LINE_SEPARATOR)));
|
||||
renderer.setOverviewHtml(Files.readAllLines(overviewHtml.toPath(), Charset.defaultCharset()).stream().collect(Collectors.joining(UIUtil.LINE_SEPARATOR)));
|
||||
openHTMLRender(null);
|
||||
overviewHtml.delete();
|
||||
} catch (Throwable e) {
|
||||
|
||||
Reference in New Issue
Block a user