mirror of https://github.com/tuhiproject/tuhi.git
Read orientation from drawing, not from config
parent
d87c8122c9
commit
ec8dee07f2
|
@ -161,7 +161,7 @@ class Drawing(Gtk.EventBox):
|
|||
|
||||
@Gtk.Template.Callback('_on_split_button_clicked')
|
||||
def _on_split_button_clicked(self, button):
|
||||
dialog = Splitter(self.json_data)
|
||||
dialog = Splitter(self)
|
||||
response = dialog.run()
|
||||
|
||||
dialog.destroy()
|
||||
|
|
|
@ -34,10 +34,10 @@ class Splitter(Gtk.Dialog):
|
|||
cancel_button = Gtk.Template.Child("cancel_button")
|
||||
drawing_area = Gtk.Template.Child("drawing_area")
|
||||
|
||||
def __init__(self, json_data):
|
||||
def __init__(self, drawing):
|
||||
super().__init__()
|
||||
self.json_data = json_data
|
||||
self.orientation = Config().orientation
|
||||
self.json_data = drawing.json_data
|
||||
self.orientation = drawing.orientation
|
||||
|
||||
self.num_strokes = len(self.json_data["strokes"])
|
||||
self.max_strokes = self.num_strokes
|
||||
|
|
Loading…
Reference in New Issue