1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 08:28:36 -05:00

Multi device support: fixed saving main window state across master (sampling device) tab changes

This commit is contained in:
f4exb 2016-05-20 10:35:51 +02:00
parent e935716568
commit 2f6db428bc

View File

@ -720,17 +720,17 @@ void MainWindow::tabInputViewIndexChanged()
{
int inputViewIndex = ui->tabInputsView->currentIndex();
if ((inputViewIndex >= 0) && (inputViewIndex >= 0) && (inputViewIndex != m_masterTabIndex))
//qDebug("MainWindow::tabInputViewIndexChanged: old: %d new: %d", m_masterTabIndex, inputViewIndex);
if ((inputViewIndex >= 0) && (m_masterTabIndex >= 0) && (inputViewIndex != m_masterTabIndex))
{
DeviceUISet *deviceUI = m_deviceUIs[inputViewIndex];
DeviceUISet *lastdeviceUI = m_deviceUIs[m_masterTabIndex];
deviceUI->m_mainWindowState = saveState();
restoreState(lastdeviceUI->m_mainWindowState);
lastdeviceUI->m_mainWindowState = saveState();
restoreState(deviceUI->m_mainWindowState);
m_masterTabIndex = inputViewIndex;
}
// qDebug("MainWindow::tabInputViewIndexChanged: old: %d new: %d", m_masterTabIndex, inputViewIndex);
ui->tabSpectra->setCurrentIndex(inputViewIndex);
ui->tabChannels->setCurrentIndex(inputViewIndex);
ui->tabInputsSelect->setCurrentIndex(inputViewIndex);