Do not trigger record message if the current record did not changed
#11970
This commit is contained in:
@@ -1280,6 +1280,9 @@
|
||||
return this.__current_record;
|
||||
},
|
||||
set current_record(record) {
|
||||
if (this.__current_record === record) {
|
||||
return;
|
||||
}
|
||||
this.__current_record = record;
|
||||
var pos = null;
|
||||
var record_id = null;
|
||||
|
||||
@@ -70,8 +70,8 @@ class Screen:
|
||||
lambda: collections.defaultdict(lambda: None))
|
||||
self.tree_states_done = set()
|
||||
self.__group = None
|
||||
self.new_group(context or {})
|
||||
self.__current_record = None
|
||||
self.new_group(context or {})
|
||||
self.current_record = None
|
||||
self.screen_container = ScreenContainer(attributes.get('tab_domain'))
|
||||
self.screen_container.alternate_view = attributes.get(
|
||||
@@ -486,6 +486,8 @@ class Screen:
|
||||
return self.__current_record
|
||||
|
||||
def __set_current_record(self, record):
|
||||
if self.__current_record == record:
|
||||
return
|
||||
self.__current_record = record
|
||||
if record:
|
||||
try:
|
||||
@@ -501,7 +503,6 @@ class Screen:
|
||||
self.update_resources(record.resources if record else None)
|
||||
# update resources after 1 second
|
||||
GLib.timeout_add(1000, self._update_resources, record)
|
||||
return True
|
||||
|
||||
current_record = property(__get_current_record, __set_current_record)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user