def on_change_rotation_ref(self, widget: Gtk.RadioButton): for w in widget.get_group(): if w.get_active(): self.rotation_ref = { 'rotate-ref-obj-center': RotationRef.CENTER, 'rotate-ref-origin': RotationRef.ORIGIN, 'rotate-ref-abs': RotationRef.ABSOLUTE, }[w.get_name()] if w.get_name() == 'rotate-ref-abs': for _id in 'rotation-ref-x', 'rotation-ref-y': self.builder.get_object(_id).set_editable(True)
def on_rotation_ref(self, widget: Gtk.RadioButton): for w in widget.get_group(): if w.get_active(): self.rotation_ref = { 'rotate-obj-center': RotationRef.CENTER, 'rotate-origin': RotationRef.ORIGIN, 'rotate-arb': RotationRef.ARBITRARY, }[w.get_name()] if w.get_name() == 'rotate-arb': for _id in 'rot_x', 'rot_y': self.builder.get_object(_id).set_editable(True)