ask the user to update the texts if and only if any character was changed

This commit is contained in:
honfika@gmail.com
2016-01-07 10:37:09 +01:00
parent 8e9c38fa71
commit 5ed98393ee
4 changed files with 26 additions and 33 deletions

View File

@@ -79,8 +79,6 @@ public class FontEmbedDialog extends AppDialog {
private final JCheckBox allCheckbox;
private final JCheckBox updateTextsCheckbox;
public Font getSelectedFont() {
if (ttfFileRadio.isSelected() && customFont != null) {
return customFont;
@@ -88,10 +86,6 @@ public class FontEmbedDialog extends AppDialog {
return ((FontFace) faceSelection.getSelectedItem()).font;
}
public boolean hasUpdateTexts() {
return updateTextsCheckbox.isSelected();
}
public Set<Integer> getSelectedChars() {
Set<Integer> chars = new TreeSet<>();
Font f = getSelectedFont();
@@ -250,13 +244,8 @@ public class FontEmbedDialog extends AppDialog {
individialSample = new JLabel();
specialPanel.add(individualCharsField);
updateTextsCheckbox = new JCheckBox(AppStrings.translate("font.updateTexts"));
JPanel utPanel = new JPanel(new FlowLayout());
utPanel.add(updateTextsCheckbox);
cnt.add(specialPanel);
cnt.add(individialSample);
cnt.add(utPanel);
JPanel buttonsPanel = new JPanel(new FlowLayout());
JButton okButton = new JButton(AppStrings.translate("button.ok"));