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

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

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

revision 295 by capela, Tue Nov 16 15:26:18 2004 UTC revision 301 by capela, Wed Nov 17 16:43:49 2004 UTC
# Line 104  void qsamplerMainForm::init (void) Line 104  void qsamplerMainForm::init (void)
104      m_pMessages = NULL;      m_pMessages = NULL;
105    
106      // We'll start clean.      // We'll start clean.
107      m_iUntitled = 0;      m_iUntitled    = 0;
108      m_iDirtyCount = 0;      m_iDirtyCount  = 0;
109        m_iChangeCount = 0;
110    
111      m_pServer = NULL;      m_pServer = NULL;
112      m_pClient = NULL;      m_pClient = NULL;
# Line 566  bool qsamplerMainForm::loadSessionFile ( Line 567  bool qsamplerMainForm::loadSessionFile (
567      m_sFilename = sFilename;      m_sFilename = sFilename;
568      updateRecentFiles(sFilename);      updateRecentFiles(sFilename);
569      appendMessages(tr("Open session: \"%1\".").arg(sessionName(m_sFilename)));      appendMessages(tr("Open session: \"%1\".").arg(sessionName(m_sFilename)));
570        
571        // Make that an overall update.
572        m_iChangeCount++;
573      stabilizeForm();      stabilizeForm();
574      return true;      return true;
575  }  }
# Line 767  void qsamplerMainForm::editAddChannel (v Line 771  void qsamplerMainForm::editAddChannel (v
771      if (m_pClient == NULL)      if (m_pClient == NULL)
772          return;          return;
773    
774      // Just create the channel strip, given an invalid channel id.      // Just create the channel strip,
775      qsamplerChannelStrip *pChannelStrip = createChannelStrip(-1);      // by giving an invalid channel id.
776      if (pChannelStrip == NULL)      createChannelStrip(-1);
         return;  
           
     // We'll be dirty, for sure...  
     m_iDirtyCount++;  
     // Stabilize form anyway.  
     stabilizeForm();  
777  }  }
778    
779    
# Line 855  void qsamplerMainForm::editResetChannel Line 853  void qsamplerMainForm::editResetChannel
853    
854      // Refresh channel strip info.      // Refresh channel strip info.
855      pChannelStrip->updateChannelInfo();      pChannelStrip->updateChannelInfo();
856        // And force a deferred update.
857        m_iChangeCount++;
858  }  }
859    
860    
# Line 1142  void qsamplerMainForm::stabilizeForm (vo Line 1142  void qsamplerMainForm::stabilizeForm (vo
1142  // Channel change receiver slot.  // Channel change receiver slot.
1143  void qsamplerMainForm::channelStripChanged( qsamplerChannelStrip * )  void qsamplerMainForm::channelStripChanged( qsamplerChannelStrip * )
1144  {  {
1145        // Flag that we're update those channel strips.
1146        m_iChangeCount++;
1147      // Just mark the dirty form.      // Just mark the dirty form.
1148      m_iDirtyCount++;      m_iDirtyCount++;
1149      // and update the form status...      // and update the form status...
# Line 1502  void qsamplerMainForm::timerSlot (void) Line 1504  void qsamplerMainForm::timerSlot (void)
1504      }      }
1505            
1506          // Refresh each channel usage, on each period...          // Refresh each channel usage, on each period...
1507      if (m_pClient && m_pOptions->bAutoRefresh && m_pWorkspace->isUpdatesEnabled()) {      if (m_pClient && (m_iChangeCount > 0 || m_pOptions->bAutoRefresh)) {
1508          m_iTimerSlot += QSAMPLER_TIMER_MSECS;          m_iTimerSlot += QSAMPLER_TIMER_MSECS;
1509          if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime)  {          if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime && m_pWorkspace->isUpdatesEnabled())  {
1510              m_iTimerSlot = 0;              m_iTimerSlot = 0;
1511                m_iChangeCount = 0;
1512              QWidgetList wlist = m_pWorkspace->windowList();              QWidgetList wlist = m_pWorkspace->windowList();
1513              for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {              for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {
1514                  qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);                  qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);
1515                  if (pChannelStrip && pChannelStrip->isVisible())                  if (pChannelStrip && pChannelStrip->isVisible()) {
1516                      pChannelStrip->updateChannelUsage();                      // If we can't make it clean, try next time.
1517                        if (!pChannelStrip->updateChannelUsage())
1518                            m_iChangeCount++;
1519                    }
1520              }              }
1521          }          }
1522      }      }

Legend:
Removed from v.295  
changed lines
  Added in v.301

  ViewVC Help
Powered by ViewVC