Removed commit from playerpoints

This commit is contained in:
Sebastian Lohff 2013-11-21 15:23:48 +01:00
parent 1bae9069a0
commit 7d9b18843e
2 changed files with 4 additions and 5 deletions

View File

@ -142,7 +142,7 @@ class SeopardyGame(QtGui.QWidget):
prefix *= -1
if not correct:
prefix *= -1
player.add_points(answers.points()*prefix, commit=not rollback)
player.add_points(answers.points()*prefix)
def _restyle_button(self, sec, qno, answers):

View File

@ -33,12 +33,11 @@ class Player(QtGui.QWidget):
def change_name(self, new_name):
self.name = new_name
self.name_label.set_text(new_name)
self.name_label.setText(new_name)
def add_points(self, amount, commit=True):
def add_points(self, amount):
self.points += amount
if commit:
self.points_label.setText(str(self.points))
self.points_label.setText(str(self.points))
@classmethod
def gen_player(clazz, num, parent=None):