Refreshing Save buttons when files were modified outside application

This commit is contained in:
Jindra Petřík
2024-08-02 20:24:04 +02:00
parent cbcc2dc88a
commit 1db54b6e4c
3 changed files with 31 additions and 5 deletions

View File

@@ -2364,12 +2364,19 @@ public class Main {
continue;
}
for (OpenableSourceInfo info : sourceInfos) {
final String infoFile = info.getFile();
if (infoFile != null && new File(infoFile).equals(fullPath)) {
for (OpenableSourceInfo info : sourceInfos) {
final String infoFile = info.getFile();
if (infoFile != null && new File(infoFile).equals(fullPath)) {
for (OpenableList list :Main.getMainFrame().getPanel().getSwfs()) {
if (info == list.sourceInfo) {
list.setModified();
}
}
View.execInEventDispatchLater(new Runnable() {
@Override
public void run() {
mainFrame.getPanel().refreshTree();
if (filesChangedDialog == null) {
filesChangedDialog = new FilesChangedDialog(Main.mainFrame.getWindow());
}