/[svn]/qsampler/trunk/src/qsamplerInstrumentForm.ui.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerInstrumentForm.ui.h

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

revision 1012 by capela, Sun Dec 17 22:29:29 2006 UTC revision 1013 by capela, Mon Jan 8 16:52:48 2007 UTC
# Line 2  Line 2 
2  //  //
3  // ui.h extension file, included from the uic-generated form implementation.  // ui.h extension file, included from the uic-generated form implementation.
4  /****************************************************************************  /****************************************************************************
5     Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 130  void qsamplerInstrumentForm::setup ( qsa Line 130  void qsamplerInstrumentForm::setup ( qsa
130          // It might be no maps around...          // It might be no maps around...
131          bool bMapEnabled = (MapComboBox->count() > 0);          bool bMapEnabled = (MapComboBox->count() > 0);
132          MapTextLabel->setEnabled(bMapEnabled);          MapTextLabel->setEnabled(bMapEnabled);
133          MapComboBox->setEnabled(bNew && bMapEnabled);          MapComboBox->setEnabled(bMapEnabled);
134    
135          // Instrument bank/program...          // Instrument bank/program...
136          int iBank = (bNew ? pOptions->iMidiBank : m_pInstrument->bank());          int iBank = (bNew ? pOptions->iMidiBank : m_pInstrument->bank());
# Line 141  void qsamplerInstrumentForm::setup ( qsa Line 141  void qsamplerInstrumentForm::setup ( qsa
141          }          }
142          BankSpinBox->setValue(iBank);          BankSpinBox->setValue(iBank);
143          ProgSpinBox->setValue(iProg);          ProgSpinBox->setValue(iProg);
         // Spacial hack to avoid changes on the key...  
         if (bNew) {  
                 BankSpinBox->setRange(0, 16383);  
                 ProgSpinBox->setRange(1, 128);  
         } else {  
                 BankSpinBox->setRange(iBank, iBank);  
                 ProgSpinBox->setRange(iProg, iProg);  
         }  
144    
145          // Instrument name...          // Instrument name...
146          NameLineEdit->setText(m_pInstrument->name());          NameLineEdit->setText(m_pInstrument->name());
# Line 291  void qsamplerInstrumentForm::accept (voi Line 283  void qsamplerInstrumentForm::accept (voi
283    
284          if (m_iDirtyCount > 0) {          if (m_iDirtyCount > 0) {
285                  m_pInstrument->setMap(MapComboBox->currentItem());                  m_pInstrument->setMap(MapComboBox->currentItem());
                 m_pInstrument->setMap(MapComboBox->currentItem());  
286                  m_pInstrument->setBank(BankSpinBox->value());                  m_pInstrument->setBank(BankSpinBox->value());
287                  m_pInstrument->setProg(ProgSpinBox->value() - 1);                  m_pInstrument->setProg(ProgSpinBox->value() - 1);
288                  m_pInstrument->setName(NameLineEdit->text());                  m_pInstrument->setName(NameLineEdit->text());

Legend:
Removed from v.1012  
changed lines
  Added in v.1013

  ViewVC Help
Powered by ViewVC