Skip to content

Commit

Permalink
Merge branch 'pr/1653'
Browse files Browse the repository at this point in the history
  • Loading branch information
buchen committed Jul 18, 2020
2 parents d6ced15 + fd06046 commit c6a0d8e
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,12 @@ public FilterDropDown(IPreferenceStore preferenceStore)
super(Messages.SecurityListFilter, Images.FILTER_OFF, SWT.NONE);
setMenuListener(this);

int savedFilters = preferenceStore.getInt(this.getClass().getSimpleName() + "-filterSettings"); //$NON-NLS-1$
int savedFilters;
if (watchlist != null)
savedFilters = preferenceStore.getInt(this.getClass().getSimpleName() + "-filterSettings" + "-" + watchlist.getName()); //$NON-NLS-1$ //$NON-NLS-2$
else
savedFilters = preferenceStore.getInt(this.getClass().getSimpleName() + "-filterSettings"); //$NON-NLS-1$


if ((savedFilters & (1 << 1)) != 0)
filter.add(securityIsNotInactive);
Expand All @@ -202,7 +207,7 @@ public FilterDropDown(IPreferenceStore preferenceStore)

if (!filter.isEmpty())
setImage(Images.FILTER_ON);

addDisposeListener(e -> {

int savedFilter = 0;
Expand All @@ -216,8 +221,10 @@ public FilterDropDown(IPreferenceStore preferenceStore)
savedFilter += (1 << 4);
if (filter.contains(sharesEqualZero))
savedFilter += (1 << 5);

preferenceStore.setValue(this.getClass().getSimpleName() + "-filterSettings", savedFilter); //$NON-NLS-1$
if (watchlist != null)
preferenceStore.setValue(this.getClass().getSimpleName() + "-filterSettings" + "-" + watchlist.getName(), savedFilter); //$NON-NLS-1$ //$NON-NLS-2$
else
preferenceStore.setValue(this.getClass().getSimpleName() + "-filterSettings", savedFilter); //$NON-NLS-1$
});
}

Expand Down

0 comments on commit c6a0d8e

Please sign in to comment.