fixed file logging bug

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@636 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
kascade 2007-04-19 21:44:44 +00:00
parent c677368076
commit ee8d191bd7
1 changed files with 4 additions and 2 deletions

View File

@ -333,9 +333,10 @@ public final class EcuLogger extends JFrame implements WindowListener, PropertyC
private void initFileLoggingController(final EcuSwitch fileLoggingControllerSwitch) { private void initFileLoggingController(final EcuSwitch fileLoggingControllerSwitch) {
controller.setFileLoggerSwitchMonitor(new FileLoggerControllerSwitchMonitorImpl(fileLoggingControllerSwitch, new FileLoggerControllerSwitchHandler() { controller.setFileLoggerSwitchMonitor(new FileLoggerControllerSwitchMonitorImpl(fileLoggingControllerSwitch, new FileLoggerControllerSwitchHandler() {
boolean oldDefogStatus = false;
public void handleSwitch(double switchValue) { public void handleSwitch(double switchValue) {
if (settings.isFileLoggingControllerSwitchActive()) {
boolean logToFile = (int) switchValue == 1; boolean logToFile = (int) switchValue == 1;
if (settings.isFileLoggingControllerSwitchActive() && logToFile != oldDefogStatus) {
logToFileButton.setSelected(logToFile); logToFileButton.setSelected(logToFile);
if (logToFile) { if (logToFile) {
fileUpdateHandler.start(); fileUpdateHandler.start();
@ -343,6 +344,7 @@ public final class EcuLogger extends JFrame implements WindowListener, PropertyC
fileUpdateHandler.stop(); fileUpdateHandler.stop();
} }
} }
oldDefogStatus = logToFile;
} }
})); }));
} }