Skip to content
Snippets Groups Projects
Commit 98842055 authored by helene ortiz's avatar helene ortiz
Browse files

On close, save view state of launch pad only for main client and if

server is still running.
parent 9e212893
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
* Post area in chat: now "multilined". Remove placeholder "Send message".
* For remote clients, if remote control is disabled, display info in window title and nothing about token state.
* New login button for remote access login screen.
* On close, save view state of launch pad only for main client.
* On close, save view state of launch pad only for main client and if server is still running.
4.0.18 29/05/2020
------
......
......@@ -442,8 +442,11 @@ public class MainWindow implements ServerConfigurationChangeListener, ServerEnde
ConfigManager.getInstance().savePreference(ConfigManager.MAGNIFY_FACTOR_INDEX, Magnifier.getScaleIndex() + "");
if (ConfigManager.getInstance().isMainClient()) {
String property = ConfigManager.LAUNCH_PAD_TEXT_MODE + "=" + String.valueOf(CommandWindow.getInstance().getServerTabButton().getCommandWorkspace().isInTextMode());
ResourceManager.getInstance().saveFile(ConfigManager.GLOBAL_PREFERENCES_FILE, property, ResourceManager.PROPERTIES_FILE, true);
boolean serverRunning = ServerConnection.getInstance(CommandZoneWrapper.SERVER_ID).serverExists();
if (serverRunning) {
String property = ConfigManager.LAUNCH_PAD_TEXT_MODE + "=" + String.valueOf(CommandWindow.getInstance().getServerTabButton().getCommandWorkspace().isInTextMode());
ResourceManager.getInstance().saveFile(ConfigManager.GLOBAL_PREFERENCES_FILE, property, ResourceManager.PROPERTIES_FILE, true);
}
} else {
ConfigManager.getInstance().savePreference(ConfigManager.REMOTE_USER_NAME, UserConnection.getInstance().getUserName());
ConfigManager.getInstance().savePreference(ConfigManager.REMOTE_INSTRUMENT, RemoteControlManager.getInstance().getInstrumentName());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment