indication fixed

This commit is contained in:
Radek Davidek 2026-01-21 10:27:21 +01:00
parent 6ee3bc8201
commit 3645fdc78b

View File

@ -966,6 +966,18 @@ public class FilePanelTab extends JPanel {
public void refresh(boolean requestFocus) { public void refresh(boolean requestFocus) {
List<FileItem> newItems = createFileItemList(currentDirectory); List<FileItem> newItems = createFileItemList(currentDirectory);
if (isSameContent(newItems, tableModel.items)) { if (isSameContent(newItems, tableModel.items)) {
// Nothing changed since last refresh. If there were any "recently changed"
// highlights, clear them now as the files have stabilized.
boolean found = false;
for (FileItem item : tableModel.items) {
if (item.isRecentlyChanged()) {
item.setRecentlyChanged(false);
found = true;
}
}
if (found) {
fileTable.repaint();
}
return; return;
} }
@ -1025,24 +1037,6 @@ public class FilePanelTab extends JPanel {
} }
} }
fileTable.repaint(); fileTable.repaint();
if (!changedNames.isEmpty()) {
// Clear the recentlyChanged flag after 2 seconds
javax.swing.Timer timer = new javax.swing.Timer(2000, e -> {
boolean found = false;
for (FileItem item : tableModel.items) {
if (item.isRecentlyChanged()) {
item.setRecentlyChanged(false);
found = true;
}
}
if (found) {
fileTable.repaint();
}
});
timer.setRepeats(false);
timer.start();
}
}); });
} }