Use the right record to set wizard button state

When the wizard receive the record-modified signal, current_record is not yet
set on the screen so we must use the record from the signal to set the button
state.

issue4171
review7581002
This commit is contained in:
Cédric Krier committed 2014-09-16 10:05:05 +02:00
1 parent c26018a4f3
commit 1fca0d85b6
2 files changed
+3 -4

No files matched your search

+2 -2
View File
@@ -277,8 +277,8 @@ class Screen(SignalEvent):
if hasattr(view, 'group_list_changed'):
view.group_list_changed(group, signal)
def _record_modified(self, group, signal, *args):
self.signal('record-modified')
def _record_modified(self, group, signal):
self.signal('record-modified', signal)
def _group_changed(self, group, record):
if not self.parent:
+1 -2
View File
@@ -150,8 +150,7 @@ class Wizard(object):
button.show()
return button
def _record_modified(self, screen, signal):
record = screen.current_record
def _record_modified(self, screen, record):
for button in self.states.itervalues():
button.state_set(record)