Skip to content

Commit

Permalink
Fix loading of log filter from preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyD97 committed Mar 15, 2023
1 parent 0e5e214 commit fb67ba2
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class PreferencesPanel extends JScrollPane {

private final JToggleButton tglbtnIsEnabled;
private final JLabel esValueChangeWarning = new JLabel(
"Warning: Changing preferences while running will disable the upload service and clear all pending groups.");
"Warning: Changing preferences while running will disable the upload service and clear all pending uploads.");

/**
* Create the panel.
Expand All @@ -69,7 +69,7 @@ public void actionPerformed(ActionEvent e) {
tglbtnIsEnabled.setSelected(preferences.getSetting(PREF_ENABLED));

ComponentGroup doNotLogPanel = new ComponentGroup(Orientation.HORIZONTAL, "Log Filter");
JTextField doNotLogFilterField = new JTextField(preferences.getSetting(PREF_DO_NOT_LOG_IF_MATCH));
JTextField doNotLogFilterField = new JTextField();
doNotLogPanel.add(new JLabel("Do not log entries matching filter: "));
GridBagConstraints gbc = doNotLogPanel.generateNextConstraints(true);
gbc.weightx = 100;
Expand All @@ -96,7 +96,9 @@ public void actionPerformed(ActionEvent e) {
}
}
});
if(preferences.getSetting(PREF_DO_NOT_LOG_IF_MATCH) != null){
FilterExpression filterExpression = preferences.getSetting(PREF_DO_NOT_LOG_IF_MATCH);
if(filterExpression != null){
doNotLogFilterField.setText(filterExpression.toString());
applyButton.doClick();
}
doNotLogPanel.add(applyButton);
Expand Down

0 comments on commit fb67ba2

Please sign in to comment.