Commit 6cb66dd4 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

#16752 : change Fix push button logic: executes three operations in sequence

parent 13223b86
......@@ -72,6 +72,7 @@ void FourUHV::onPsListReady(const CuData &da) {
const QString& s = w->property("point").toString();
if(s.contains("%1")) w->setProperty("source", QString(s).arg(ch));
}
// object name like pbFix3k, pbFix5k
if(w->property("target").isValid() || w->objectName().contains(QRegularExpression("pbFix\\dk"))) {
const QString& t = w->property("point").toString();
if(t.contains("%1")) {
......
......@@ -17,9 +17,13 @@ Channel::~Channel()
}
void Channel::onPbFixClicked() {
const QString& t0 = QString("$1/Fixed%1(1)").arg(sender()->property("channel").toInt());
// FixedX(0) then VTargetX(NNNN) then FixedX(1) where X is the channel and NNNN the voltage
// properties set in FourUHV::onPsListReady
const QString& t0 = QString("$1/Fixed%1(0)").arg(sender()->property("channel").toInt());
const QString& t1 = sender()->property("target").toString();
foreach(const QString& t, QStringList() << t0 << t1) {
const QString& t2 = QString("$1/Fixed%1(1))").arg(sender()->property("channel").toInt());
foreach(const QString& t, QStringList() << t0 << t1 << t2) {
QuWriter *w = new QuWriter(this, cu_pool, m_ctrl_fpool);
w->setAutoDestroy(true);
w->setTarget(t);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment