Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAneesh Dogra <lionaneesh@gmail.com>2012-12-22 15:34:53 (GMT)
committer Aneesh Dogra <lionaneesh@gmail.com>2012-12-22 15:36:12 (GMT)
commit1f85e9c7fe8723995561adf4c84772f0af52cb6d (patch)
tree2cb5bcf2f2932207de6bf800876966ee25f15ebd
parenta2fe695a01687be014bba274c96e3c06fc10958d (diff)
Fix constellations overlapping and clear the combobox before filling.
-rw-r--r--ConstellationsFlashCards.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ConstellationsFlashCards.py b/ConstellationsFlashCards.py
index fc55dbc..66c87e6 100644
--- a/ConstellationsFlashCards.py
+++ b/ConstellationsFlashCards.py
@@ -355,9 +355,7 @@ class ChartDisplay(Gtk.DrawingArea):
self.diameter + 4,
self.diameter + 4)
self.ctx.fill()
-
# Plot sky square
-
color_rgb = Color(self.colors[1]).get_rgba()[:-1] # we don't need alpha
self.ctx.set_source_rgb(*color_rgb)
self.ctx.rectangle(self.xoffset + self.margin - 2,
@@ -612,6 +610,7 @@ class ChartDisplay(Gtk.DrawingArea):
def fill_names_combobox(self):
+ cbq1.remove_all()
# Create a list of five names, initialized to ""
names = ["", "", "", "", ""]
@@ -654,11 +653,12 @@ class ChartDisplay(Gtk.DrawingArea):
# Clear the drawing surface
color_rgb = Color(self.colors[2]).get_rgba()[:-1] # we don't need alpha
+ self.ctx = self.get_window().cairo_create()
self.ctx.set_source_rgb(*color_rgb)
self.ctx.rectangle(self.xoffset + self.margin - 2,
- self.yoffset + self.margin - 2,
- self.screensize[0],
- self.screensize[1])
+ self.yoffset + self.margin - 2,
+ self.screensize[0],
+ self.screensize[1])
self.ctx.fill()