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; |
768 |
if (m_pClient == NULL) |
if (m_pClient == NULL) |
769 |
return; |
return; |
770 |
|
|
771 |
// Just create the channel strip, given an invalid channel id. |
// Just create the channel strip, |
772 |
qsamplerChannelStrip *pChannelStrip = createChannelStrip(-1); |
// by giving an invalid channel id. |
773 |
if (pChannelStrip == NULL) |
createChannelStrip(-1); |
|
return; |
|
|
|
|
|
// We'll be dirty, for sure... |
|
|
m_iDirtyCount++; |
|
|
// Stabilize form anyway. |
|
|
stabilizeForm(); |
|
774 |
} |
} |
775 |
|
|
776 |
|
|
850 |
|
|
851 |
// Refresh channel strip info. |
// Refresh channel strip info. |
852 |
pChannelStrip->updateChannelInfo(); |
pChannelStrip->updateChannelInfo(); |
853 |
|
// And force a deferred update. |
854 |
|
m_iChangeCount++; |
855 |
} |
} |
856 |
|
|
857 |
|
|
1139 |
// Channel change receiver slot. |
// Channel change receiver slot. |
1140 |
void qsamplerMainForm::channelStripChanged( qsamplerChannelStrip * ) |
void qsamplerMainForm::channelStripChanged( qsamplerChannelStrip * ) |
1141 |
{ |
{ |
1142 |
|
// Flag that we're update those channel strips. |
1143 |
|
m_iChangeCount++; |
1144 |
// Just mark the dirty form. |
// Just mark the dirty form. |
1145 |
m_iDirtyCount++; |
m_iDirtyCount++; |
1146 |
// and update the form status... |
// and update the form status... |
1501 |
} |
} |
1502 |
|
|
1503 |
// Refresh each channel usage, on each period... |
// Refresh each channel usage, on each period... |
1504 |
if (m_pClient && m_pOptions->bAutoRefresh && m_pWorkspace->isUpdatesEnabled()) { |
if (m_pClient && (m_iChangeCount > 0 || m_pOptions->bAutoRefresh)) { |
1505 |
m_iTimerSlot += QSAMPLER_TIMER_MSECS; |
m_iTimerSlot += QSAMPLER_TIMER_MSECS; |
1506 |
if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime) { |
if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime && m_pWorkspace->isUpdatesEnabled()) { |
1507 |
m_iTimerSlot = 0; |
m_iTimerSlot = 0; |
1508 |
|
m_iChangeCount = 0; |
1509 |
QWidgetList wlist = m_pWorkspace->windowList(); |
QWidgetList wlist = m_pWorkspace->windowList(); |
1510 |
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
1511 |
qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel); |
qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel); |
1512 |
if (pChannelStrip && pChannelStrip->isVisible()) |
if (pChannelStrip && pChannelStrip->isVisible()) { |
1513 |
pChannelStrip->updateChannelUsage(); |
// If we can't make it clean, try next time. |
1514 |
|
if (!pChannelStrip->updateChannelUsage()) |
1515 |
|
m_iChangeCount++; |
1516 |
|
} |
1517 |
} |
} |
1518 |
} |
} |
1519 |
} |
} |