Skip to content

Commit bf3372b

Browse files
committed
Fix bug in loading session settings for widget layouts
Fixes #1138
1 parent f1219b0 commit bf3372b

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Fix LSL AvgBandPower data type only one value is sent #1098
77
- Fix error starting BrainFlow Streaming Board from external process #1102
88
- Fix Hardware Settings button not clickable after resizing app #1132
9+
- Fix bug loading Session Settings related to Widget Layouts #1138
910

1011
### Improvements
1112

OpenBCI_GUI/OpenBCI_GUI.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import http.requests.*;
6161
// Global Variables & Instances
6262
//------------------------------------------------------------------------
6363
//Used to check GUI version in TopNav.pde and displayed on the splash screen on startup
64-
String localGUIVersionString = "v5.1.1-alpha.4";
64+
String localGUIVersionString = "v5.1.1-alpha.5";
6565
String localGUIVersionDate = "June 2023";
6666
String guiLatestVersionGithubAPI = "https://api.github.com/repos/OpenBCI/OpenBCI_GUI/releases/latest";
6767
String guiLatestReleaseLocation = "https://github.com/OpenBCI/OpenBCI_GUI/releases/latest";

OpenBCI_GUI/SessionSettings.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ class SessionSettings {
522522
println("SessionSettings: " + numActiveWidgets + " active widgets saved!");
523523
//Print what widgets are in the containers used by current layout for only the number of active widgets
524524
//for (int i = 0; i < numActiveWidgets; i++) {
525-
//int containerCounter = wm.layouts.get(currentLayout-1).containerInts[i];
525+
//int containerCounter = wm.layouts.get(currentLayout).containerInts[i];
526526
//println("Container " + containerCounter + " is available"); //For debugging
527527
//}
528528
saveSettingsJSONData.setJSONObject(kJSONKeyWidget, saveWidgetSettings);

OpenBCI_GUI/TopNav.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,10 +658,10 @@ class LayoutSelector {
658658
tempLayoutButton.setForceDrawBackground(true);
659659
tempLayoutButton.onRelease(new CallbackListener() {
660660
public void controlEvent(CallbackEvent theEvent) {
661-
output("Layout [" + (layoutNumber+1) + "] selected.");
661+
output("Layout [" + (layoutNumber) + "] selected.");
662662
toggleVisibility(); //shut layoutSelector if something is selected
663663
wm.setNewContainerLayout(layoutNumber); //have WidgetManager update Layout and active widgets
664-
settings.currentLayout = layoutNumber+1; //copy this value to be used when saving Layout setting
664+
settings.currentLayout = layoutNumber; //copy this value to be used when saving Layout setting
665665
}
666666
});
667667
layoutOptions.add(tempLayoutButton);

0 commit comments

Comments
 (0)