Fixed a bug that caused playback system to send according to file upon
start up even though combobox said bus 0.
This commit is contained in:
@@ -12,7 +12,7 @@ FramePlaybackObject::FramePlaybackObject()
|
|||||||
playbackActive = false;
|
playbackActive = false;
|
||||||
playbackForward = true;
|
playbackForward = true;
|
||||||
useOrigTiming = false;
|
useOrigTiming = false;
|
||||||
whichBusSend = -1;
|
whichBusSend = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FramePlaybackObject::~FramePlaybackObject()
|
FramePlaybackObject::~FramePlaybackObject()
|
||||||
@@ -289,6 +289,7 @@ void FramePlaybackObject::setUseOriginalTiming(bool state)
|
|||||||
|
|
||||||
void FramePlaybackObject::setSendingBus(int bus)
|
void FramePlaybackObject::setSendingBus(int bus)
|
||||||
{
|
{
|
||||||
|
qDebug() << "Setting sending bus to " << bus;
|
||||||
whichBusSend = bus;
|
whichBusSend = bus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -296,9 +296,14 @@ void FramePlaybackWindow::calculateWhichBus()
|
|||||||
{
|
{
|
||||||
int idx = ui->comboCANBus->currentIndex();
|
int idx = ui->comboCANBus->currentIndex();
|
||||||
int maxIdx = ui->comboCANBus->count() - 1;
|
int maxIdx = ui->comboCANBus->count() - 1;
|
||||||
|
if (maxIdx == 0) maxIdx = 2;
|
||||||
int out = idx;
|
int out = idx;
|
||||||
|
|
||||||
|
qDebug() << idx << "***" << maxIdx;
|
||||||
|
|
||||||
if (idx == (maxIdx - 1) ) out = -1;
|
if (idx == (maxIdx - 1) ) out = -1;
|
||||||
if (idx == maxIdx) out = -2;
|
if (idx == maxIdx) out = -2;
|
||||||
|
if (idx < 0) out = 0;
|
||||||
|
|
||||||
playbackObject.setSendingBus(out);
|
playbackObject.setSendingBus(out);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user