Read orientation from drawing, not from config

pull/281/head
Christoph Stelz 2021-06-23 09:15:31 +02:00
parent d87c8122c9
commit ec8dee07f2
2 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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