Add Save/Modified display in modeline
This commit is contained in:
@@ -3,7 +3,6 @@ package app.controllers;
|
||||
import java.net.URL;
|
||||
import java.util.Collection;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
@@ -16,6 +15,7 @@ import org.fxmisc.richtext.model.TwoDimensional.Position;
|
||||
|
||||
import app.events.EditorChangedEvent;
|
||||
import app.events.LanguageChangedEvent;
|
||||
import app.events.FileSaveStateChangedEvent;
|
||||
import app.model.Model;
|
||||
import app.service.LanguageOperations;
|
||||
import javafx.fxml.FXML;
|
||||
@@ -71,6 +71,10 @@ public class EditorController implements Initializable, Controller {
|
||||
Position pos = this.editor.offsetToPosition(offset, Bias.Forward);
|
||||
this.eventBus.post(new EditorChangedEvent(pos.getMajor() + 1, pos.getMinor()));
|
||||
|
||||
|
||||
if (Model.getFileIsSaved())
|
||||
this.eventBus.post(new FileSaveStateChangedEvent(false));
|
||||
|
||||
this.refreshHighlighting();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user