Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/fracciones.activity/gtkcake.py
diff options
context:
space:
mode:
Diffstat (limited to 'fracciones.activity/gtkcake.py')
-rwxr-xr-xfracciones.activity/gtkcake.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/fracciones.activity/gtkcake.py b/fracciones.activity/gtkcake.py
index f12bdd5..c42fd62 100755
--- a/fracciones.activity/gtkcake.py
+++ b/fracciones.activity/gtkcake.py
@@ -45,8 +45,10 @@ class Cake(gtk.DrawingArea):
@property
def current_fraction(self):
- return Fraction(len([selected for selected in self.selected_list if selected]), self.subdivisions)
-
+ fraction = Fraction()
+ fraction.numerator = len([selected for selected in self.selected_list if selected])
+ fraction.denominator = self.subdivisions
+ return fraction
def reset(self, subdivisions, draw=True):
# variables de estado de la torta