Ver código fonte

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

Neal Wilson 12 anos atrás
pai
commit
918939c86a
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4
    0
      config/Windows/greensales.xml

+ 4
- 0
config/Windows/greensales.xml Ver arquivo

27
 			unitBox.addItem("Kg");
27
 			unitBox.addItem("Kg");
28
 			unitBox.addItem("oz");
28
 			unitBox.addItem("oz");
29
 			unitBox.addItem("lb");
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
 			var convertToPounds = function(w, u) {
34
 			var convertToPounds = function(w, u) {
31
 				switch(u)
35
 				switch(u)
32
 				{
36
 				{

Carregando…
Cancelar
Salvar