diff --git a/OlivOS/core/info/infoAPI.py b/OlivOS/core/info/infoAPI.py index a4a8642f..ae722ec0 100644 --- a/OlivOS/core/info/infoAPI.py +++ b/OlivOS/core/info/infoAPI.py @@ -17,9 +17,9 @@ import OlivOS -OlivOS_Version = '0.11.44' -OlivOS_SVN = 164 -OlivOS_Version_Slogan = '大薯条' +OlivOS_Version = '0.11.45' +OlivOS_SVN = 165 +OlivOS_Version_Slogan = '立秋' # Compatible <= Plugin[compatible_svn] : Compatible # OldCompatible <= Plugin[compatible_svn] < Compatible : OldCompatible Warn diff --git a/OlivOS/nativeGUI/nativeWinUIAPI.py b/OlivOS/nativeGUI/nativeWinUIAPI.py index fb2b2010..41015581 100644 --- a/OlivOS/nativeGUI/nativeWinUIAPI.py +++ b/OlivOS/nativeGUI/nativeWinUIAPI.py @@ -1165,8 +1165,9 @@ def start(self): ipadx=0, ipady=0 ) + self.UIData['flag_tree_is_bottom'] = True self.UIObject['tree'].configure( - yscrollcommand=self.UIObject['tree_yscroll'].set + yscrollcommand=self.scroll_onChange(self.UIObject['tree_yscroll'].set) ) self.root_Entry_init( @@ -1202,6 +1203,15 @@ def start(self): self.exit() + def scroll_onChange(self, command): + def res(*arg, **kwarg): + if arg[1] == '1.0': + self.UIData['flag_tree_is_bottom'] = True + else: + self.UIData['flag_tree_is_bottom'] = False + return command(*arg, **kwarg) + return res + def tree_rightKey(self, event): # 右键设置的选择在后续流程中未生效,不知为何,等后续解决 # iid = self.UIObject['tree'].identify_row(event.y) @@ -1333,8 +1343,9 @@ def tree_add_line(self, data, flagInit = False): res_data ) ) - self.UIObject['tree'].see(iid) - self.UIObject['tree'].update() + if self.UIData['flag_tree_is_bottom']: + self.UIObject['tree'].see(iid) + #self.UIObject['tree'].update() except: pass @@ -1454,8 +1465,9 @@ def start(self): ipadx=0, ipady=0 ) + self.UIData['flag_tree_is_bottom'] = True self.UIObject['tree'].configure( - yscrollcommand=self.UIObject['tree_yscroll'].set + yscrollcommand=self.scroll_onChange(self.UIObject['tree_yscroll'].set) ) self.root_Entry_init( @@ -1491,6 +1503,15 @@ def start(self): self.exit() + def scroll_onChange(self, command): + def res(*arg, **kwarg): + if arg[1] == '1.0': + self.UIData['flag_tree_is_bottom'] = True + else: + self.UIData['flag_tree_is_bottom'] = False + return command(*arg, **kwarg) + return res + def tree_rightKey(self, event): # 右键设置的选择在后续流程中未生效,不知为何,等后续解决 # iid = self.UIObject['tree'].identify_row(event.y) @@ -1595,8 +1616,9 @@ def tree_add_line(self, data, flagInit = False): res_data ) ) - self.UIObject['tree'].see(iid) - self.UIObject['tree'].update() + if self.UIData['flag_tree_is_bottom']: + self.UIObject['tree'].see(iid) + #self.UIObject['tree'].update() except: pass @@ -1697,8 +1719,9 @@ def start(self): ipadx=0, ipady=0 ) + self.UIData['flag_tree_is_bottom'] = True self.UIObject['tree'].configure( - yscrollcommand=self.UIObject['tree_yscroll'].set + yscrollcommand=self.scroll_onChange(self.UIObject['tree_yscroll'].set) ) self.root_Entry_init( @@ -1734,6 +1757,15 @@ def start(self): self.exit() + def scroll_onChange(self, command): + def res(*arg, **kwarg): + if arg[1] == '1.0': + self.UIData['flag_tree_is_bottom'] = True + else: + self.UIData['flag_tree_is_bottom'] = False + return command(*arg, **kwarg) + return res + def tree_rightKey(self, event): # 右键设置的选择在后续流程中未生效,不知为何,等后续解决 # iid = self.UIObject['tree'].identify_row(event.y) @@ -1830,8 +1862,9 @@ def tree_add_line(self, data, flagInit = False): res_data ) ) - self.UIObject['tree'].see(iid) - self.UIObject['tree'].update() + if self.UIData['flag_tree_is_bottom']: + self.UIObject['tree'].see(iid) + #self.UIObject['tree'].update() except: pass @@ -1918,8 +1951,9 @@ def start(self): ipadx=0, ipady=0 ) + self.UIData['flag_tree_is_bottom'] = True self.UIObject['tree'].configure( - yscrollcommand=self.UIObject['tree_yscroll'].set + yscrollcommand=self.scroll_onChange(self.UIObject['tree_yscroll'].set) ) self.root_Entry_init( @@ -1955,6 +1989,15 @@ def start(self): self.exit() + def scroll_onChange(self, command): + def res(*arg, **kwarg): + if arg[1] == '1.0': + self.UIData['flag_tree_is_bottom'] = True + else: + self.UIData['flag_tree_is_bottom'] = False + return command(*arg, **kwarg) + return res + def tree_rightKey(self, event): # 右键设置的选择在后续流程中未生效,不知为何,等后续解决 # iid = self.UIObject['tree'].identify_row(event.y) @@ -2051,8 +2094,9 @@ def tree_add_line(self, data, flagInit = False): res_data ) ) - self.UIObject['tree'].see(iid) - self.UIObject['tree'].update() + if self.UIData['flag_tree_is_bottom']: + self.UIObject['tree'].see(iid) + #self.UIObject['tree'].update() except: pass @@ -2138,8 +2182,9 @@ def start(self): ipadx=0, ipady=0 ) + self.UIData['flag_tree_is_bottom'] = True self.UIObject['tree'].configure( - yscrollcommand=self.UIObject['tree_yscroll'].set + yscrollcommand=self.scroll_onChange(self.UIObject['tree_yscroll'].set) ) self.root_Entry_init( @@ -2175,6 +2220,15 @@ def start(self): self.exit() + def scroll_onChange(self, command): + def res(*arg, **kwarg): + if arg[1] == '1.0': + self.UIData['flag_tree_is_bottom'] = True + else: + self.UIData['flag_tree_is_bottom'] = False + return command(*arg, **kwarg) + return res + def tree_rightKey(self, event): # 右键设置的选择在后续流程中未生效,不知为何,等后续解决 # iid = self.UIObject['tree'].identify_row(event.y) @@ -2271,8 +2325,9 @@ def tree_add_line(self, data, flagInit = False): res_data ) ) - self.UIObject['tree'].see(iid) - self.UIObject['tree'].update() + if self.UIData['flag_tree_is_bottom']: + self.UIObject['tree'].see(iid) + #self.UIObject['tree'].update() except: pass @@ -2372,8 +2427,9 @@ def start(self): ipadx=0, ipady=0 ) + self.UIData['flag_tree_is_bottom'] = True self.UIObject['tree'].configure( - yscrollcommand=self.UIObject['tree_yscroll'].set + yscrollcommand=self.scroll_onChange(self.UIObject['tree_yscroll'].set) ) self.tree_edit_UI_Combobox_init( @@ -2442,6 +2498,15 @@ def start(self): self.exit() + def scroll_onChange(self, command): + def res(*arg, **kwarg): + if arg[1] == '1.0': + self.UIData['flag_tree_is_bottom'] = True + else: + self.UIData['flag_tree_is_bottom'] = False + return command(*arg, **kwarg) + return res + def tree_rightKey(self, event): # 右键设置的选择在后续流程中未生效,不知为何,等后续解决 # iid = self.UIObject['tree'].identify_row(event.y) @@ -2596,8 +2661,9 @@ def tree_add_line(self, data): ), tag=log_level ) - self.UIObject['tree'].see(iid) - self.UIObject['tree'].update() + if self.UIData['flag_tree_is_bottom']: + self.UIObject['tree'].see(iid) + #self.UIObject['tree'].update() except: pass @@ -3027,8 +3093,9 @@ def start(self): ipadx=0, ipady=0 ) + self.UIData['flag_tree_is_bottom'] = True self.UIObject['tree'].configure( - yscrollcommand=self.UIObject['tree_yscroll'].set + yscrollcommand=self.scroll_onChange(self.UIObject['tree_yscroll'].set) ) self.root_Entry_init( @@ -3065,6 +3132,15 @@ def start(self): self.exit() + def scroll_onChange(self, command): + def res(*arg, **kwarg): + if arg[1] == '1.0': + self.UIData['flag_tree_is_bottom'] = True + else: + self.UIData['flag_tree_is_bottom'] = False + return command(*arg, **kwarg) + return res + def tree_rightKey(self, event): self.UIObject['tree_rightkey_menu'].delete(0, tkinter.END) self.UIObject['tree_rightkey_menu'].add_command(label='查看', command=lambda: self.rightKey_action('show')) @@ -3176,8 +3252,9 @@ def tree_add_line(self, data, user_conf=None): res_data_list_this ) ) - self.UIObject['tree'].see(iid) - self.UIObject['tree'].update() + if self.UIData['flag_tree_is_bottom']: + self.UIObject['tree'].see(iid) + #self.UIObject['tree'].update() except: pass