Added #1901 Editor mode and autosave feature for header, raw editor, transform

This commit is contained in:
Jindra Petřík
2022-12-22 18:15:29 +01:00
parent 380d7b9078
commit c2ceec8628
18 changed files with 362 additions and 778 deletions

View File

@@ -67,7 +67,7 @@ import layout.TableLayout;
*
* @author JPEXS
*/
public class FontPanel extends JPanel {
public class FontPanel extends JPanel implements TagEditorPanel {
private final MainPanel mainPanel;
@@ -110,6 +110,7 @@ public class FontPanel extends JPanel {
return new DefaultComboBoxModel<>(new Vector<>(faceSet));
}
@Override
public boolean isEditing() {
return saveButton.isVisible();
}
@@ -861,4 +862,13 @@ public class FontPanel extends JPanel {
private JPanel contentPanel;
private JScrollPane contentScrollPane;
@Override
public boolean tryAutoSave() {
if (Configuration.autoSaveTagModifications.get()) {
saveButtonActionPerformed(null);
return !(saveButton.isVisible() && saveButton.isEnabled());
}
return false;
}
}