Example #1
0
    def __create_from_cue():
        cue = Application().layout.get_context_cue()
        name = save_preset_dialog(cue.name)

        if name is not None:
            if not (preset_exists(name) and not check_override_dialog(name)):
                preset = cue.properties(only_changed=True)

                # Discard id and index
                preset.pop('id')
                preset.pop('index')

                try:
                    write_preset(name, preset)
                except OSError as e:
                    write_preset_error(e, name, parent=MainWindow())
Example #2
0
 def get_cue_at(self, index):
     cue = Application().layout.get_cue_at(index)
     if cue is not None:
         return cue.properties()
     return {}
Example #3
0
 def get_cue_at(self, index):
     cue = Application().layout.model_adapter.item(index)
     if cue is not None:
         return cue.properties()
     return {}