Logo Search packages:      
Sourcecode: canorus version File versions  Download package

void CAMainWin::on_uiVoiceNum_valChanged ( int  voiceNr  )  [private, slot]

Called when a user changes the current voice number.

Definition at line 3009 of file mainwin.cpp.

References currentContext(), CAScoreViewPort::setSelectedVoice(), and updateVoiceToolBar().

                                                    {
      updateVoiceToolBar();
      if ( currentScoreViewPort() ) {
            if ( voiceNr &&
                 currentScoreViewPort()->currentContext() &&
                 currentScoreViewPort()->currentContext()->context()->contextType() == CAContext::Staff &&
                 voiceNr <= static_cast<CAStaff*>(currentScoreViewPort()->currentContext()->context())->voiceCount()
               )
                  currentScoreViewPort()->setSelectedVoice( static_cast<CAStaff*>(currentScoreViewPort()->currentContext()->context())->voiceAt(voiceNr-1) );
            else
                  currentScoreViewPort()->setSelectedVoice(0);

            currentScoreViewPort()->repaint();
      }
}


Generated by  Doxygen 1.6.0   Back to index