From 3812742b763c6e1b5b0aabf7ef00fc438e94bbbe Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 13 Nov 2016 13:33:11 +0100 Subject: [PATCH] reload sb settings when deleting a setting --- src/yugecin/opsudance/ui/SBOverlay.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/yugecin/opsudance/ui/SBOverlay.java b/src/yugecin/opsudance/ui/SBOverlay.java index 330fa8c5..c8a34991 100644 --- a/src/yugecin/opsudance/ui/SBOverlay.java +++ b/src/yugecin/opsudance/ui/SBOverlay.java @@ -161,10 +161,13 @@ public class SBOverlay { private void goBackOneSBIndex() { if (index + 1 < optionsMap.length && optionsMap[index + 1] != null) { // new options on previous index, so to revert then we have to reload them all to this point.. - final int thisIndex = index; - for (int i = 0; i <= thisIndex; i++) { - updateIndex(i); - } + reloadSBsettingsToIndex(index); + } + } + + private void reloadSBsettingsToIndex(final int index) { + for (int i = 0; i <= index; i++) { + updateIndex(i); } } @@ -236,6 +239,7 @@ public class SBOverlay { if (optionsMap[index].size() == 0) { optionsMap[index] = null; } + reloadSBsettingsToIndex(index); return true; } ypos += lh;