Browse Source

Column name fix

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

+ 13
- 1
config/Windows/productionroaster.xml View File

842
 				log.newAnnotation("End", 1, lc);
842
 				log.newAnnotation("End", 1, lc);
843
             }
843
             }
844
         });
844
         });
845
+		var columnName = function(c) {
846
+			var visibleColumns = 0;
847
+			for(var i = 0; i < channels.length; i++) {
848
+				if(channelVisibility[i]) {
849
+					visibleColumns++;
850
+				}
851
+				if(c == visibleColumns - 1) {
852
+					return columnNames[i];
853
+				}
854
+			}
855
+			return "";
856
+		};
845
 		window.postLoadColumnSetup = function(c) {
857
 		window.postLoadColumnSetup = function(c) {
846
 			for(var i = 0; i < adapters.length; i++)
858
 			for(var i = 0; i < adapters.length; i++)
847
 			{
859
 			{
848
 				adapters[i].setColumn(c + i + 1);
860
 				adapters[i].setColumn(c + i + 1);
849
 				zeroemitters[i].setColumn(c + i + 1);
861
 				zeroemitters[i].setColumn(c + i + 1);
850
-				log.setHeaderData(c + i + 1, columnNames[i]);
862
+				log.setHeaderData(c + i + 1, columnName(i));
851
 			}
863
 			}
852
 			log.setHeaderData(c + columnNames.length + 1 - channelSkip, "Note");
864
 			log.setHeaderData(c + columnNames.length + 1 - channelSkip, "Note");
853
             stop.setTemperatureColumn(c + 1);
865
             stop.setTemperatureColumn(c + 1);

Loading…
Cancel
Save