~artem-anufrij/metronome/trunk

« back to all changes in this revision

Viewing changes to src/objects/Click.vala

  • Committer: Artem Anufrij
  • Date: 2015-10-05 23:35:34 UTC
  • Revision ID: artem.anufrij@live.de-20151005233534-5tarac8mok59dur7
added presets (dev)

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
            yield;
98
98
        }
99
99
 
 
100
        public void set_custom_setting (Metronome.Setting custom_setting) {
 
101
            current_tempo = custom_setting.tempo;
 
102
            current_beat = custom_setting.beat;
 
103
            if (current_state == click_state.running) {
 
104
                stop ();
 
105
                start.begin ();
 
106
            }
 
107
        }
 
108
 
100
109
        public bool is_settings_valid () {
101
110
            return is_tempo_valid (current_tempo) && is_beat_valid (current_beat);
102
111
        }