Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Collett <morgan.collett@gmail.com>2008-10-31 14:54:37 (GMT)
committer Morgan Collett <morgan.collett@gmail.com>2008-10-31 14:54:37 (GMT)
commitece22d72e6a10fa7614deec79958a9bd35e5eb57 (patch)
treeefece0e99b04c66df7ddaf4a73c1066cd074887f
parent1f2f84a2b89157dee6ac1ef6568511c7d2e61c1d (diff)
#7864 Fix Lesson Plan crash on loading repeatedly
-rw-r--r--poll.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/poll.py b/poll.py
index 83b2eff..4f49e48 100644
--- a/poll.py
+++ b/poll.py
@@ -1,5 +1,6 @@
# Copyright 2007 World Wide Workshop Foundation
# Copyright 2007 Collabora Ltd
+# Copyright 2008 Morgan Collett
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -187,6 +188,9 @@ class PollBuilder(activity.Activity):
self._previewing = False
self._current_view = None # so we can switch back
+ # Lesson plan widget
+ self._lessonplan_widget = None
+
toolbox = activity.ActivityToolbox(self)
self.set_toolbox(toolbox)
toolbox.show()
@@ -417,6 +421,7 @@ class PollBuilder(activity.Activity):
lessonplan = LessonPlanWidget(self._basepath)
lessonplan.set_size_request(1050, 500)
+ self._lessonplan_widget = lessonplan
poll_details_box.append(hippo.CanvasWidget(widget=lessonplan),
hippo.PACK_EXPAND)
@@ -993,6 +998,8 @@ class PollBuilder(activity.Activity):
elif lesson_return == 'build':
self._canvas.set_root(self._build_canvas())
self.show_all()
+ del self._lessonplan_widget
+ self._lessonplan_widget = None
def _size_answer_text(self, choice):
"""Choose font size for poll answers.