Repair a regression in parsing map65 UI colours

This commit is contained in:
Bill Somerville 2021-04-24 15:01:50 +01:00
parent 4a7d5b8602
commit 8c056a3edb
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -2,6 +2,7 @@
#include "mainwindow.h" #include "mainwindow.h"
#include <QTextStream> #include <QTextStream>
#include <QDebug> #include <QDebug>
#include <cstdio>
#include <portaudio.h> #include <portaudio.h>
#define MAXDEVICES 200 #define MAXDEVICES 200
@ -111,10 +112,8 @@ void DevSetup::initDlg()
ui.mult570TxSpinBox->setValue(m_mult570Tx); ui.mult570TxSpinBox->setValue(m_mult570Tx);
ui.cal570SpinBox->setValue(m_cal570); ui.cal570SpinBox->setValue(m_cal570);
ui.sbTxOffset->setValue(m_TxOffset); ui.sbTxOffset->setValue(m_TxOffset);
QTextStream its {&m_colors, QIODevice::ReadOnly}; ::sscanf (m_colors.toLatin1(),"%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x",
its.setIntegerBase (16); &r,&g,&b,&r0,&g0,&b0,&r1,&g1,&b1,&r2,&g2,&b2,&r3,&g3,&b3);
its.setFieldWidth (2);
its >> r >> g >> b >> r0 >> g0 >> b0 >> r1 >> g1 >> b1 >> r2 >> g2 >> b2 >> r3 >> g3 >> b3;
updateColorLabels(); updateColorLabels();
ui.sbBackgroundRed->setValue(r); ui.sbBackgroundRed->setValue(r);
ui.sbBackgroundGreen->setValue(g); ui.sbBackgroundGreen->setValue(g);