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

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

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

revision 2070 by capela, Mon Mar 15 17:06:46 2010 UTC revision 2071 by capela, Mon Mar 15 18:21:28 2010 UTC
# Line 237  void InstrumentListForm::editInstrument Line 237  void InstrumentListForm::editInstrument
237    
238          // Do the edit dance...          // Do the edit dance...
239          InstrumentForm form(this);          InstrumentForm form(this);
240          form.setup(&instrument);          form.setup(pInstrument);
241          if (!form.exec())          if (!form.exec())
242                  return;                  return;
243                    
244          // Commit...          // Commit...
245          instrument.mapInstrument();          pInstrument->mapInstrument();
246    
247          // Check whether we changed instrument key...          // Check whether we changed instrument key...
248          if (instrument.map()  == iMap  &&          if (pInstrument->map()  == iMap  &&
249                  instrument.bank() == iBank &&                  pInstrument->bank() == iBank &&
250                  instrument.prog() == iProg) {                  pInstrument->prog() == iProg) {
251                  // Just update tree item...                  // Just update tree item...
252                  m_pInstrumentListView->updateInstrument(pInstrument);                  m_pInstrumentListView->updateInstrument(pInstrument);
253          } else {          } else {
254                  // Unmap old instance...                  // Unmap old instance...
255                  Instrument(iMap, iBank, iProg).unmapInstrument();                  instrument.unmapInstrument();
256                  // Correct the position of the instrument in the model                  // Correct the position of the instrument in the model
257                  m_pInstrumentListView->resortInstrument(pInstrument);                  m_pInstrumentListView->resortInstrument(pInstrument);
258          }          }
# Line 292  void InstrumentListForm::deleteInstrumen Line 292  void InstrumentListForm::deleteInstrumen
292    
293          pInstrument->unmapInstrument();          pInstrument->unmapInstrument();
294    
295          // let the instrument vanish from the table model          // Let the instrument vanish from the table model...
296          m_pInstrumentListView->removeInstrument(pInstrument);          m_pInstrumentListView->removeInstrument(pInstrument);
297    
298          stabilizeForm();          stabilizeForm();

Legend:
Removed from v.2070  
changed lines
  Added in v.2071

  ViewVC Help
Powered by ViewVC