Browse Source

fix: ordering host_list

micha 4 months ago
parent
commit
65102ff2e5
1 changed files with 7 additions and 2 deletions
  1. 7 2
      tkray/dmx.py

+ 7 - 2
tkray/dmx.py

@@ -319,7 +319,7 @@ while not pyray.window_should_close():
         GREY = [122,122,122,255]
         GREY = [122,122,122,255]
         p=0
         p=0
         keys = []
         keys = []
-        host_list = {}
+        host_list = {} #"0":[]}
         k="xxx"
         k="xxx"
         if DATA is None:
         if DATA is None:
             k="None"
             k="None"
@@ -347,7 +347,12 @@ while not pyray.window_should_close():
             render_grid(cur,250,50)
             render_grid(cur,250,50)
 
 
         p=0
         p=0
-        for k,v in host_list.items():
+        host_list_key = list(host_list.keys())
+        host_list_key.sort()
+
+        #for k,v in host_list.items():
+        for k in host_list_key:
+            v=host_list[k]
             x2 = 10
             x2 = 10
             y2 = 60+p #grid_y+p
             y2 = 60+p #grid_y+p
             v = str(v).replace(" ","").replace("[","").replace("]","") 
             v = str(v).replace(" ","").replace("[","").replace("]","")