ソースを参照

Fix translation offset.

Neal Wilson 11年前
コミット
fe9062299e
1個のファイルの変更11行の追加2行の削除
  1. 11
    2
      config/Windows/productionroaster.xml

+ 11
- 2
config/Windows/productionroaster.xml ファイルの表示

@@ -633,6 +633,15 @@
633 633
 				channelSkip++;
634 634
 			}
635 635
 		}
636
+		var offsetForChannel = function(c) {
637
+			var retval = -1;
638
+			for(var i = 0; i <= c; i++) {
639
+				if(channelVisibility[i]) {
640
+					retval++;
641
+				}
642
+			}
643
+			return retval;
644
+		};
636 645
         start.clicked.connect(function() {
637 646
 			start.enabled = false;
638 647
 			hasTranslated = false;
@@ -663,7 +672,7 @@
663 672
             }
664 673
 			if(translationChannel >= 0)
665 674
 			{
666
-				offsets[translationChannel].measurement.connect(currentDetector.newMeasurement);
675
+				offsets[offsetForChannel(translationChannel)].measurement.connect(currentDetector.newMeasurement);
667 676
 			}
668 677
 			if(typeof(externtrans) != 'undefined') {
669 678
 				externtrans.display(0);
@@ -725,7 +734,7 @@
725 734
             }
726 735
 			if(translationChannel >= 0)
727 736
 			{
728
-				offsets[translationChannel].measurement.disconnect(currentDetector.newMeasurement);
737
+				offsets[offsetForChannel(translationChannel)].measurement.disconnect(currentDetector.newMeasurement);
729 738
 			}
730 739
 			start.enabled = true;
731 740
 			window.windowModified = false;

読み込み中…
キャンセル
保存