Move the reload plugin list code to its own function
This commit is contained in:
@@ -850,10 +850,8 @@ public class ConfigPanel extends PluginPanel
|
||||
}
|
||||
|
||||
configManager.setConfiguration(cd.getGroup().value(), cig.getGroup() + "_collapse", collapse);
|
||||
|
||||
int scrollBarPosition = scrollPane.getVerticalScrollBar().getValue();
|
||||
openGroupConfigPanel(listItem, config, cd);
|
||||
scrollPane.getVerticalScrollBar().setValue(scrollBarPosition);
|
||||
|
||||
reloadPluginlist(listItem, config, cd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -891,10 +889,8 @@ public class ConfigPanel extends PluginPanel
|
||||
|
||||
if (itemHide.contains(cid.getItem().keyName()))
|
||||
{ // If another options visibility changes depending on the value of this checkbox, then render the entire menu again
|
||||
int scrollBarPosition = scrollPane.getVerticalScrollBar().getValue();
|
||||
openGroupConfigPanel(listItem, config, cd);
|
||||
scrollPane.getVerticalScrollBar().setValue(scrollBarPosition);
|
||||
return;
|
||||
|
||||
reloadPluginlist(listItem, config, cd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -903,12 +899,12 @@ public class ConfigPanel extends PluginPanel
|
||||
if (cid2.getItem().enabledBy().equals(cid.getItem().keyName()))
|
||||
{
|
||||
configManager.setConfiguration(cd.getGroup().value(), cid2.getItem().keyName(), "true");
|
||||
openGroupConfigPanel(listItem, config, cd);
|
||||
reloadPluginlist(listItem, config, cd);
|
||||
}
|
||||
else if (cid2.getItem().disabledBy().equals(cid.getItem().keyName()))
|
||||
{
|
||||
configManager.setConfiguration(cd.getGroup().value(), cid2.getItem().keyName(), "false");
|
||||
openGroupConfigPanel(listItem, config, cd);
|
||||
reloadPluginlist(listItem, config, cd);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1043,4 +1039,11 @@ public class ConfigPanel extends PluginPanel
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void reloadPluginlist(PluginListItem listItem, Config config, ConfigDescriptor cd)
|
||||
{
|
||||
int scrollBarPosition = scrollPane.getVerticalScrollBar().getValue();
|
||||
openGroupConfigPanel(listItem, config, cd);
|
||||
scrollPane.getVerticalScrollBar().setValue(scrollBarPosition);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user