Browse Source

Fix serialization with hidden series

Neal Wilson 11 years ago
parent
commit
62de5f9b88
1 changed files with 21 additions and 11 deletions
  1. 21
    11
      config/Windows/productionroaster.xml

+ 21
- 11
config/Windows/productionroaster.xml View File

719
                 var durfield = findChildObject(currentBatchInfo, 'duration');
719
                 var durfield = findChildObject(currentBatchInfo, 'duration');
720
                 durfield.text = duration;
720
                 durfield.text = duration;
721
                 log.clearOutputColumns();
721
                 log.clearOutputColumns();
722
+				channelSkip = 0;
722
 				for(var i = 0; i < channels.length; i++) {
723
 				for(var i = 0; i < channels.length; i++) {
723
-					if(channelType[i] == "T") {
724
-						log.addOutputTemperatureColumn(lc + i);
725
-					}
726
-					else {
727
-						log.addOutputControlColumn(lc + i);
724
+					if(channelVisibility[i]) {
725
+						if(channelType[i] == "T") {
726
+							log.addOutputTemperatureColumn(lc + i - channelSkip);
727
+						}
728
+						else {
729
+							log.addOutputControlColumn(lc + i - channelSkip);
730
+						}
731
+					} else {
732
+						channelSkip++;
728
 					}
733
 					}
729
 				}
734
 				}
730
-				log.addOutputAnnotationColumn(lc + channels.length);
735
+				log.addOutputAnnotationColumn(lc + channels.length - channelSkip);
731
                 var filename = log.saveTemporary();
736
                 var filename = log.saveTemporary();
732
                 currentBatchInfo.tempData = filename;
737
                 currentBatchInfo.tempData = filename;
733
                 currentBatchInfo.raise();
738
                 currentBatchInfo.raise();
893
                 var lc = Number(QSettings.value("liveColumn"));
898
                 var lc = Number(QSettings.value("liveColumn"));
894
                 var file = new QFile(filename);
899
                 var file = new QFile(filename);
895
                 log.clearOutputColumns();
900
                 log.clearOutputColumns();
901
+				channelSkip = 0;
896
 				for(var i = 0; i < columnNames.length - channelSkip; i++)
902
 				for(var i = 0; i < columnNames.length - channelSkip; i++)
897
 				{
903
 				{
898
-					if(channelType[i] == "T") {
899
-						log.addOutputTemperatureColumn(lc + i);
900
-					}
901
-					else {
902
-						log.addOutputControlColumn(lc + i);
904
+					if(channelVisibility[i]) {
905
+						if(channelType[i] == "T") {
906
+							log.addOutputTemperatureColumn(lc + i - channelSkip);
907
+						}
908
+						else {
909
+							log.addOutputControlColumn(lc + i - channelSkip);
910
+						}
911
+					} else {
912
+						channelSkip++;
903
 					}
913
 					}
904
 				}
914
 				}
905
 				log.addOutputAnnotationColumn(lc + columnNames.length - channelSkip);
915
 				log.addOutputAnnotationColumn(lc + columnNames.length - channelSkip);

Loading…
Cancel
Save