Overrided method so duplicates don't get added

This commit is contained in:
Akarshit Wal
2015-09-21 23:25:01 +05:30
parent 5f72f58ebe
commit 695f653be7
2 changed files with 2 additions and 6 deletions

View File

@@ -237,11 +237,6 @@ class StatusPanel extends JPanel {
public void update(ContributionPanel panel) {
if(contributionTab.contributionManagerDialog.updatesContributionTab.contributionListPanel.panelByContribution.values().contains(panel)){
System.out.println("same");
}else{
System.out.println("diff");
}
progressPanel.removeAll();
iconLabel.setIcon(panel.getContrib().isSpecial() ? foundationIcon : null);

View File

@@ -298,13 +298,14 @@ public class UpdateContributionTab extends ContributionTab {
}
((UpdateStatusPanel)statusPanel).update();
}
@Override
public void contributionAdded(final Contribution contribution) {
if (filter.matches(contribution)) {
EventQueue.invokeLater(new Runnable() {
public void run() {
ContributionPanel newPanel = contributionManagerDialog
.getTab(contributionType).contributionListPanel.panelByContribution
.getTab(contribution.getType()).contributionListPanel.panelByContribution
.get(contribution);
if (newPanel == null) {
newPanel = new ContributionPanel(UpdateContribListingPanel.this);