Refactore test_modified in sig_reload to use modified_save
review992002
This commit is contained in:
1 parent
039cf47ea1
commit
34252e0a71
1 file changed
+1
-8
@@ -345,14 +345,7 @@ class Form(SignalEvent, TabContent):
|
||||
def sig_reload(self, test_modified=True):
|
||||
if not hasattr(self, 'screen'):
|
||||
return False
|
||||
if test_modified and self.screen.modified():
|
||||
res = sur_3b(_('This record has been modified\n'
|
||||
'do you want to save it ?'))
|
||||
if res == 'ok':
|
||||
self.sig_save(None)
|
||||
elif res == 'ko':
|
||||
pass
|
||||
else:
|
||||
if test_modified and not self.modified_save():
|
||||
return False
|
||||
self.screen.cancel_current()
|
||||
set_cursor = False
|
||||
|
||||
Reference in new issue
Block a user