Gui slot call focus fix (#150)

* fix for editingFinished for qlineedit using isModified()

* spinbox disable keyboard tracking to use valuechanged so slot called only after editing finished, focus fix

* return pressed forces qtextfield to be set (slot for tab checks for modification flag due to avoid unnecessary set when focus). This is to remove inconsistencies from command line. A return should set even if it looks like no modification in gui

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
Dhanya Thattil
2020-09-02 16:56:57 +02:00
committed by GitHub
parent 050f0ff8a0
commit 180c7b7191
15 changed files with 290 additions and 133 deletions

View File

@ -290,7 +290,7 @@ void qTabDeveloper::Initialization() {
SLOT(Refresh()));
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetHighVoltage()));
connect(spinHV, SIGNAL(editingFinished()), this, SLOT(SetHighVoltage()));
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
}
void qTabDeveloper::PopulateDetectors() {
@ -312,7 +312,7 @@ void qTabDeveloper::GetHighVoltage() {
if (!comboHV->isVisible() && !spinHV->isVisible())
return;
LOG(logDEBUG) << "Getting High Voltage";
disconnect(spinHV, SIGNAL(editingFinished()), this, SLOT(SetHighVoltage()));
disconnect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
disconnect(comboHV, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetHighVoltage()));
try {
@ -359,7 +359,7 @@ void qTabDeveloper::GetHighVoltage() {
}
CATCH_DISPLAY("Could not get high voltage.",
"qTabDeveloper::GetHighVoltage")
connect(spinHV, SIGNAL(editingFinished()), this, SLOT(SetHighVoltage()));
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetHighVoltage()));
}