Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Fix init error in formatter config misc tab
Browse files Browse the repository at this point in the history
Enabling a string preference sets its text, which fires all event
listeners, which in this case wanted to update the preview, which wasn't
available yet because we were still initializing: NPE.

Instead, only disable the preference (this is apparently unproblematic)
when necessary, instead of enabling it when it was already enabled.
  • Loading branch information
lucaswerkmeister committed Oct 2, 2014
1 parent 6002ce0 commit b67e224
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public String isValid(String l) {
return null;
}
});

updatePreferences(
this.workingValues.get(FORMATTER_inlineAnnotations_List),
annotationsList, allAnnotations);
if (allAnnotations.getChecked()) {
annotationsList.setEnabled(false);
}

allAnnotations.addObserver(new Observer() {
public void update(Observable o, Object arg) {
Expand Down

0 comments on commit b67e224

Please sign in to comment.