Ticket #2203: linkshud.patch

File linkshud.patch, 2.5 KB (added by deni, 15 years ago)
  • modules/org.sophie2.main.func.links/src/main/java/org/sophie2/main/func/links/LinksHud.java

    ### Eclipse Workspace Patch 1.0
    #P sophie
     
    398398                                protected void setup(JPanel res) { 
    399399                                        LinksHud hud = findParentElement(LinksHud.class); 
    400400                                        if (hud == null || hud.currentRule().get() == null 
    401                                                         || hud.currentRule().get().getAction() == null 
    402                                                         ) { 
     401                                                        || hud.currentRule().get().getAction() == null) { 
     402                                                this.currentPanel = null; 
     403                                                res.removeAll(); 
    403404                                                return; 
    404405                                        } 
    405406 
    406407                                        LinkAction action = hud.currentRule().get().getAction(); 
    407  
     408                                        ActionConfigurationPanel panelToAdd = null; 
    408409                                        for (ActionConfigurationPanel panel : configPanels().get()) { 
    409410                                                if (panel.getActionClass() == action.getClass() 
    410411                                                                && panel.swingComponent() != null) { 
     
    412413                                                        if (this.currentPanel == panel) { 
    413414                                                                return; 
    414415                                                        } 
    415                                                          
    416                                                         this.currentPanel = panel; 
    417                                                          
    418                                                         res.removeAll(); 
    419                                                         res.setBorder(new TitledBorder("Action Settings")); 
    420                                                         res.add(panel.swingComponent().get()); 
     416 
     417                                                        panelToAdd = panel; 
    421418                                                        break; 
    422419                                                } 
    423420                                        } 
     421 
     422                                        res.removeAll(); 
     423                                        res.setBorder(new TitledBorder("Action Settings")); 
     424                                        this.currentPanel = panelToAdd; 
     425                                        if (this.currentPanel != null) { 
     426                                                res.add(this.currentPanel.swingComponent().get()); 
     427                                        } 
    424428                                } 
    425429                        } 
    426430                        return getBean().makeProp(swingComponent.class); 
  • modules/org.sophie2.main.func.help/src/main/java/org/sophie2/main/func/help/bugreport/BugReportDialog.java

     
    138138                                bottomPanel.add(emailField().get().swingComponent().get()); 
    139139 
    140140                                bottomPanel.add(saveButton().get().swingComponent().get()); 
     141 
     142                                bottomPanel.add(sendButton().get().swingComponent().get()); 
    141143                                 
    142144                                bottomPanel.add(cancelButton().get().swingComponent().get()); 
    143  
    144                                 bottomPanel.add(sendButton().get().swingComponent().get()); 
     145                                 
    145146                                res.add(bottomPanel); 
    146147 
    147148                                return res;