diff --git a/eepromwindow.cpp b/eepromwindow.cpp index 7ef6151..9f75a64 100644 --- a/eepromwindow.cpp +++ b/eepromwindow.cpp @@ -12,10 +12,9 @@ EEPROMWindow::EEPROMWindow(QStringList eepromLines, QWidget *parent) : int j = 0; foreach (QString str, eepromLines) { - j++; - str.remove("EPR:"); + str.remove("EPR:"); // Clear the unneeded part - repetierEEPROMline currentLine; + repetierEEPROMline currentLine; //Storage for EEPROM values QStringList tmp = str.split(' '); @@ -26,7 +25,7 @@ EEPROMWindow::EEPROMWindow(QStringList eepromLines, QWidget *parent) : lines.append(currentLine); QString msg; - for(int i = 3; i < tmp.size(); i++) msg+=(tmp.at(i) + " "); + for(int i = 3; i < tmp.size(); i++) msg+=(tmp.at(i) + " "); //Rejoin the rest QLayout *line = new QGridLayout(); @@ -60,17 +59,16 @@ EEPROMWindow::EEPROMWindow(QStringList eepromLines, QWidget *parent) : break; } - //connect(edit, SIGNAL(returnPressed()), changebox, SLOT(toggle())); connect(edit, SIGNAL(textChanged(QString)), this, SLOT(lineChanged(QString))); - //connect(changebox, SIGNAL(toggled(bool)), this, SLOT(lineChanged())); line->addWidget(label); line->addWidget(edit); - //line->addWidget(changebox); line->setMargin(2); layout->addItem(line); + + j++; // increase counter } for(int i = 0; i < lines.size(); i++) changed.append(false); ui->eepromWidgets->setLayout(layout); diff --git a/mainwindow.cpp b/mainwindow.cpp index c02146e..3d12a59 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -934,6 +934,7 @@ void MainWindow::openEEPROMeditor() { EEPROMWindow eepromwindow(EEPROMSettings, this); + eepromwindow.setWindowModality(Qt::NonModal); connect(&eepromwindow, SIGNAL(changesComplete(QStringList)), this, SLOT(sendEEPROMsettings(QStringList))); eepromwindow.exec(); @@ -943,6 +944,7 @@ void MainWindow::sendEEPROMsettings(QStringList changes) { userCommands.clear(); foreach (QString str, changes) { - injectCommand(str); + sendLine(str); + //printMsg(str); } }