diff --git a/source/net/sourceforge/filebot/ui/panel/rename/RenameAction.java b/source/net/sourceforge/filebot/ui/panel/rename/RenameAction.java index f0d3f217..d466587c 100644 --- a/source/net/sourceforge/filebot/ui/panel/rename/RenameAction.java +++ b/source/net/sourceforge/filebot/ui/panel/rename/RenameAction.java @@ -47,6 +47,7 @@ class RenameAction extends AbstractAction { name.append(".").append(extension); } + // same parent, different name File target = new File(source.getParentFile(), name.toString()); todoQueue.addLast(new Match(source, target)); @@ -70,16 +71,14 @@ class RenameAction extends AbstractAction { // rename failed Logger.getLogger("ui").warning(ExceptionUtilities.getRootCauseMessage(e)); - boolean revertFailed = false; + boolean revertSuccess = true; // revert rename operations for (Match match : doneQueue) { - if (!match.getCandidate().renameTo(match.getValue())) { - revertFailed = true; - } + revertSuccess &= match.getCandidate().renameTo(match.getValue()); } - - if (revertFailed) { + + if (!revertSuccess) { Logger.getLogger("ui").severe("Failed to revert all rename operations."); } } diff --git a/source/net/sourceforge/filebot/ui/panel/sfv/ChecksumTableModel.java b/source/net/sourceforge/filebot/ui/panel/sfv/ChecksumTableModel.java index a69ad02c..654d9cac 100644 --- a/source/net/sourceforge/filebot/ui/panel/sfv/ChecksumTableModel.java +++ b/source/net/sourceforge/filebot/ui/panel/sfv/ChecksumTableModel.java @@ -208,9 +208,8 @@ class ChecksumTableModel extends AbstractTableModel { for (ChecksumCell replacement : replacements) { int row = getRowIndex(replacement); - // update this cell - fireTableCellUpdated(row, 0); - fireTableCellUpdated(row, getColumnIndex(replacement)); + // update this row + fireTableRowsUpdated(row, row); } if (rowCount != getRowCount()) { @@ -249,8 +248,8 @@ class ChecksumTableModel extends AbstractTableModel { int row = getRowIndex((ChecksumRow) evt.getSource()); if (row >= 0) { - // update only column 0 (state) - fireTableCellUpdated(row, 0); + // update row + fireTableRowsUpdated(row, row); } } };