Ensure current record is None after removing record from the group
The removal can trigger __select_changed on the list view which may set the first record of the selection as the current record which may be the deleted record. This prevents the display triggered by record_modified to set the current record in the selection as it has been removed from the group. Closes #13712 (grafted from ed532372fe23eff7fe3e7c94b145bd87c5cf741d) --HG-- branch : 6.0
This commit is contained in:
@@ -773,6 +773,9 @@ class Screen(SignalEvent):
|
||||
self.current_record = None
|
||||
record.group.remove(record, remove=remove, signal=False,
|
||||
force_remove=force_remove)
|
||||
# set current_record to None to prevent __select_changed
|
||||
# to set deleted record as current_record
|
||||
self.current_record = None
|
||||
# send record-changed only once
|
||||
record.signal('record-changed')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user