Skip to content

Commit

Permalink
Allow to automatically start ly after generation #2560
Browse files Browse the repository at this point in the history
  • Loading branch information
rualark committed Jan 22, 2019
1 parent 79a8239 commit 4874902
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MGen/MainFrm.cpp
Expand Up @@ -885,6 +885,9 @@ LRESULT CMainFrame::OnGenFinish(WPARAM wParam, LPARAM lParam) {
if (CGLib::m_testing) {
SetTimer(TIMER4, 300, NULL);
}
// Start lilypond
if (m_lilypond_autostart)
OnButtonLy();
}
if (wParam == 1) {
// This message is sent from generation thread when t_sent is increased
Expand Down Expand Up @@ -1091,6 +1094,7 @@ void CMainFrame::LoadSettings()
CGLib::CheckVar(&st2, &st3, "show_lines", &show_lines);
CGLib::CheckVar(&st2, &st3, "show_progress", &show_progress);
CGLib::CheckVar(&st2, &st3, "autoplay", &autoplay);
CGLib::CheckVar(&st2, &st3, "lilypond_autostart", &m_lilypond_autostart);
CGLib::CheckVar(&st2, &st3, "show_tempo", &show_tempo);
CGLib::CheckVar(&st2, &st3, "show_vel", &show_vel);
CGLib::CheckVar(&st2, &st3, "show_curve", &show_curve);
Expand Down Expand Up @@ -1193,6 +1197,8 @@ void CMainFrame::SaveSettings()
fs << st;
st.Format("Lilypond_param = %s # Parameter for lilypond executable\n", m_lilypond_param);
fs << st;
st.Format("Lilypond_autostart = %d # Start lilypond automatically after generation finish\n", m_lilypond_autostart);
fs << st;
fs.close();
}

Expand Down
1 change: 1 addition & 0 deletions MGen/MainFrm.h
Expand Up @@ -70,6 +70,7 @@ class CMainFrame : public CFrameWndEx
int mx = 0, my = 0; // Mouse position
CString m_lilypond_path = ""; // Path to lilypond or Frescobaldi executable
CString m_lilypond_param = ""; // Params for lilypond executable
int m_lilypond_autostart = 0;

CString m_cline; // Command line
int m_pspeed = 100; // Playback speed in percent
Expand Down

0 comments on commit 4874902

Please sign in to comment.