浏览代码

Green coffee sales unit selector setting remembered. Default changed to lb.

Neal Wilson 11 年前
父节点
当前提交
918939c86a
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      config/Windows/greensales.xml

+ 4
- 0
config/Windows/greensales.xml 查看文件

@@ -27,6 +27,10 @@
27 27
 			unitBox.addItem("Kg");
28 28
 			unitBox.addItem("oz");
29 29
 			unitBox.addItem("lb");
30
+			unitBox.currentIndex = (QSettings.value("script/greensales_unit", unitBox.findText("lb")));
31
+			unitBox['currentIndexChanged(int)'].connect(function() {
32
+				QSettings.setValue("script/greensales_unit", unitBox.currentIndex);
33
+			});
30 34
 			var convertToPounds = function(w, u) {
31 35
 				switch(u)
32 36
 				{

正在加载...
取消
保存