mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
Fixed bugs realted to tab switching
This commit is contained in:
@@ -226,12 +226,12 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
|
||||
|
||||
protected void setSelectedPanel(ContributionPanel contributionPanel) {
|
||||
contributionTab.contributionManagerDialog.updateStatusPanel(contributionPanel);
|
||||
if (selectedPanel == contributionPanel) {
|
||||
selectedPanel.setSelected(true);
|
||||
|
||||
} else {
|
||||
|
||||
contributionTab.contributionManagerDialog.updateStatusPanel(contributionPanel);
|
||||
ContributionPanel lastSelected = selectedPanel;
|
||||
selectedPanel = contributionPanel;
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ import java.net.SocketTimeoutException;
|
||||
import java.util.*;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import javax.swing.text.SimpleAttributeSet;
|
||||
import javax.swing.text.StyleConstants;
|
||||
import javax.swing.text.StyledDocument;
|
||||
@@ -149,6 +151,17 @@ public class ContributionManagerDialog {
|
||||
tabbedPane.addTab("Updates", null, updatesContributionTab.panel, "Updates");
|
||||
tabbedPane.setMnemonicAt(3, KeyEvent.VK_5);
|
||||
|
||||
tabbedPane.addChangeListener(new ChangeListener() {
|
||||
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
// When the tab is changed update status to the current selected panel
|
||||
getActiveTab().contributionListPanel
|
||||
.setSelectedPanel(getActiveTab().contributionListPanel
|
||||
.getSelectedPanel());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// tabbedPane.setSize(450, 400);
|
||||
buildErrorPanel();
|
||||
|
||||
Reference in New Issue
Block a user