config: Fix button state
This commit is contained in:
@@ -90,7 +90,7 @@ import net.runelite.client.config.Keybind;
|
||||
import net.runelite.client.config.ModifierlessKeybind;
|
||||
import net.runelite.client.config.Range;
|
||||
import net.runelite.client.config.Units;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.events.PluginChanged;
|
||||
import net.runelite.client.plugins.PluginManager;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
@@ -136,6 +136,9 @@ class ConfigPanel extends PluginPanel
|
||||
@Inject
|
||||
private ColorPickerManager colorPickerManager;
|
||||
|
||||
@Inject
|
||||
private EventBus eventBus;
|
||||
|
||||
private PluginConfigurationDescriptor pluginConfig = null;
|
||||
private final Map<String, JPanel> sectionWidgets = new HashMap<>();
|
||||
private final Map<String, JPanel> titleSectionWidgets = new HashMap<>();
|
||||
@@ -230,6 +233,7 @@ class ConfigPanel extends PluginPanel
|
||||
}
|
||||
|
||||
rebuild(false);
|
||||
eventBus.subscribe(PluginChanged.class, this, this::onPluginChanged);
|
||||
}
|
||||
|
||||
private void getSections(ConfigDescriptor cd)
|
||||
@@ -1169,7 +1173,6 @@ class ConfigPanel extends PluginPanel
|
||||
return new Dimension(PANEL_WIDTH + SCROLLBAR_WIDTH, super.getPreferredSize().height);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onPluginChanged(PluginChanged event)
|
||||
{
|
||||
if (event.getPlugin() == this.pluginConfig.getPlugin())
|
||||
|
||||
@@ -43,7 +43,6 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import javax.inject.Inject;
|
||||
@@ -70,7 +69,6 @@ import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.config.OpenOSRSConfig;
|
||||
import net.runelite.client.config.RuneLiteConfig;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.eventbus.Subscribe;
|
||||
import net.runelite.client.events.ConfigChanged;
|
||||
import net.runelite.client.events.ExternalPluginChanged;
|
||||
import net.runelite.client.events.ExternalPluginsLoaded;
|
||||
@@ -110,7 +108,6 @@ public class PluginListPanel extends PluginPanel
|
||||
|
||||
private final ConfigManager configManager;
|
||||
private final PluginManager pluginManager;
|
||||
private final ScheduledExecutorService executorService;
|
||||
private final Provider<ConfigPanel> configPanelProvider;
|
||||
private final OpenOSRSConfig openOSRSConfig;
|
||||
private final List<PluginConfigurationDescriptor> fakePlugins = new ArrayList<>();
|
||||
@@ -142,7 +139,6 @@ public class PluginListPanel extends PluginPanel
|
||||
public PluginListPanel(
|
||||
ConfigManager configManager,
|
||||
PluginManager pluginManager,
|
||||
ScheduledExecutorService executorService,
|
||||
Provider<ConfigPanel> configPanelProvider,
|
||||
OpenOSRSConfig openOSRSConfig,
|
||||
EventBus eventBus)
|
||||
@@ -151,7 +147,6 @@ public class PluginListPanel extends PluginPanel
|
||||
|
||||
this.configManager = configManager;
|
||||
this.pluginManager = pluginManager;
|
||||
this.executorService = executorService;
|
||||
this.configPanelProvider = configPanelProvider;
|
||||
this.openOSRSConfig = openOSRSConfig;
|
||||
|
||||
@@ -186,13 +181,13 @@ public class PluginListPanel extends PluginPanel
|
||||
});
|
||||
|
||||
eventBus.subscribe(ExternalPluginsLoaded.class, this, ignored -> {
|
||||
eventBus.subscribe(ExternalPluginChanged.class, this, ev -> {
|
||||
SwingUtilities.invokeLater(this::rebuildPluginList);
|
||||
});
|
||||
eventBus.subscribe(ExternalPluginChanged.class, this, ev -> SwingUtilities.invokeLater(this::rebuildPluginList));
|
||||
|
||||
SwingUtilities.invokeLater(this::rebuildPluginList);
|
||||
});
|
||||
|
||||
eventBus.subscribe(PluginChanged.class, this, this::onPluginChanged);
|
||||
|
||||
muxer = new MultiplexingPluginPanel(this);
|
||||
|
||||
searchBar = new IconTextField();
|
||||
@@ -475,7 +470,6 @@ public class PluginListPanel extends PluginPanel
|
||||
configManager.setConfiguration(RUNELITE_GROUP_NAME, PINNED_PLUGINS_CONFIG_KEY, value);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onPluginChanged(PluginChanged event)
|
||||
{
|
||||
SwingUtilities.invokeLater(this::refresh);
|
||||
|
||||
Reference in New Issue
Block a user