/[svn]/qsampler/trunk/src/qsamplerInstrumentList.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerInstrumentList.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1015 by capela, Mon Jan 8 19:10:42 2007 UTC revision 1016 by capela, Mon Jan 8 22:04:33 2007 UTC
# Line 532  void qsamplerInstrumentList::editItemSlo Line 532  void qsamplerInstrumentList::editItemSlo
532                          pInstrument = pItem->instrument();                          pInstrument = pItem->instrument();
533                  if (pInstrument) {                  if (pInstrument) {
534                          // Save current key values...                          // Save current key values...
535                          int iMap  = pInstrument->map();                          qsamplerInstrument oldInstrument(*pInstrument);
                         int iBank = pInstrument->bank();  
                         int iProg = pInstrument->prog();  
536                          // Do the edit dance...                          // Do the edit dance...
537                          qsamplerInstrumentForm form(this);                          qsamplerInstrumentForm form(this);
538                          form.setup(pInstrument);                          form.setup(pInstrument);
# Line 542  void qsamplerInstrumentList::editItemSlo Line 540  void qsamplerInstrumentList::editItemSlo
540                                  // Commit...                                  // Commit...
541                                  pInstrument->mapInstrument();                                  pInstrument->mapInstrument();
542                                  // Check whether we changed instrument key...                                  // Check whether we changed instrument key...
543                                  if (iMap  == pInstrument->map()  &&                                  if (oldInstrument.map()  == pInstrument->map()  &&
544                                          iBank == pInstrument->bank() &&                                          oldInstrument.bank() == pInstrument->bank() &&
545                                          iProg == pInstrument->prog()) {                                          oldInstrument.prog() == pInstrument->prog()) {
546                                          // just update tree item...                                          // just update tree item...
547                                          pItem->update();                                          pItem->update();
548                                  } else {                                  } else {
549                                            // Unmap old instance...
550                                            oldInstrument.unmapInstrument();
551                                          // Change item tree, whether applicable...                                          // Change item tree, whether applicable...
552                                          if (m_iMidiMap < 0 || m_iMidiMap == pInstrument->map()) {                                          if (m_iMidiMap < 0 || m_iMidiMap == pInstrument->map()) {
553                                                  // Add new brand item into view...                                                  // Add new brand item into view...

Legend:
Removed from v.1015  
changed lines
  Added in v.1016

  ViewVC Help
Powered by ViewVC