mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 16:48:01 +02:00
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:
@ -26,7 +26,7 @@ void qDacWidget::SetupWidgetWindow(std::string name) {
|
||||
|
||||
void qDacWidget::Initialization() {
|
||||
if (isDac) {
|
||||
connect(spinDac, SIGNAL(editingFinished()), this, SLOT(SetDac()));
|
||||
connect(spinDac, SIGNAL(valueChanged(double)), this, SLOT(SetDac()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ void qDacWidget::SetDetectorIndex(int id) {
|
||||
void qDacWidget::GetDac() {
|
||||
LOG(logDEBUG) << "Getting Dac " << index;
|
||||
|
||||
disconnect(spinDac, SIGNAL(editingFinished()), this, SLOT(SetDac()));
|
||||
disconnect(spinDac, SIGNAL(valueChanged(double)), this, SLOT(SetDac()));
|
||||
try {
|
||||
// dac units
|
||||
auto retval = det->getDAC(index, 0, {detectorIndex}).squash(-1);
|
||||
@ -52,7 +52,7 @@ void qDacWidget::GetDac() {
|
||||
CATCH_DISPLAY(std::string("Could not get dac ") + std::to_string(index),
|
||||
"qDacWidget::GetDac")
|
||||
|
||||
connect(spinDac, SIGNAL(editingFinished()), this, SLOT(SetDac()));
|
||||
connect(spinDac, SIGNAL(valueChanged(double)), this, SLOT(SetDac()));
|
||||
}
|
||||
|
||||
void qDacWidget::SetDac() {
|
||||
|
Reference in New Issue
Block a user