From fca1dac674f06abe5a40978dba9b0dbc836926ef Mon Sep 17 00:00:00 2001 From: Mirko Waechter <mirko.waechter@kit.edu> Date: Sat, 12 Nov 2016 14:59:46 +0100 Subject: [PATCH] fix: platform gui: slots were added again on reconnect --- .../PlatformUnitGuiPlugin.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/source/RobotAPI/gui-plugins/PlatformUnitPlugin/PlatformUnitGuiPlugin.cpp b/source/RobotAPI/gui-plugins/PlatformUnitPlugin/PlatformUnitGuiPlugin.cpp index 6f81f81a1..d99aeb98c 100644 --- a/source/RobotAPI/gui-plugins/PlatformUnitPlugin/PlatformUnitGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/PlatformUnitPlugin/PlatformUnitGuiPlugin.cpp @@ -140,18 +140,18 @@ void PlatformUnitWidget::saveSettings(QSettings* settings) void PlatformUnitWidget::connectSlots() { - connect(ui.buttonMoveToPosition, SIGNAL(clicked()), this, SLOT(moveTo())); - connect(&ctrlEvaluationTimer, SIGNAL(timeout()), this, SLOT(controlTimerTick())); - connect(&keyboardVelocityTimer, SIGNAL(timeout()), this, SLOT(keyboardVelocityControl())); - connect(speedCtrl, SIGNAL(pressed()), this, SLOT(startControlTimer())); - connect(speedCtrl, SIGNAL(pressed()), &keyboardVelocityTimer, SLOT(stop())); - connect(rotaCtrl, SIGNAL(pressed()), this, SLOT(startControlTimer())); - connect(rotaCtrl, SIGNAL(pressed()), &keyboardVelocityTimer, SLOT(stop())); - connect(speedCtrl, SIGNAL(released()), this, SLOT(stopPlatform())); - connect(speedCtrl, SIGNAL(released()), this, SLOT(stopControlTimer())); - connect(rotaCtrl, SIGNAL(released()), this, SLOT(stopPlatform())); - connect(rotaCtrl, SIGNAL(released()), this, SLOT(stopControlTimer())); - connect(ui.buttonStopPlatform, SIGNAL(pressed()), this, SLOT(stopPlatform())); + connect(ui.buttonMoveToPosition, SIGNAL(clicked()), this, SLOT(moveTo()), Qt::UniqueConnection); + connect(&ctrlEvaluationTimer, SIGNAL(timeout()), this, SLOT(controlTimerTick()), Qt::UniqueConnection); + connect(&keyboardVelocityTimer, SIGNAL(timeout()), this, SLOT(keyboardVelocityControl()), Qt::UniqueConnection); + connect(speedCtrl, SIGNAL(pressed()), this, SLOT(startControlTimer()), Qt::UniqueConnection); + connect(speedCtrl, SIGNAL(pressed()), &keyboardVelocityTimer, SLOT(stop()), Qt::UniqueConnection); + connect(rotaCtrl, SIGNAL(pressed()), this, SLOT(startControlTimer()), Qt::UniqueConnection); + connect(rotaCtrl, SIGNAL(pressed()), &keyboardVelocityTimer, SLOT(stop()), Qt::UniqueConnection); + connect(speedCtrl, SIGNAL(released()), this, SLOT(stopPlatform()), Qt::UniqueConnection); + connect(speedCtrl, SIGNAL(released()), this, SLOT(stopControlTimer()), Qt::UniqueConnection); + connect(rotaCtrl, SIGNAL(released()), this, SLOT(stopPlatform()), Qt::UniqueConnection); + connect(rotaCtrl, SIGNAL(released()), this, SLOT(stopControlTimer()), Qt::UniqueConnection); + connect(ui.buttonStopPlatform, SIGNAL(pressed()), this, SLOT(stopPlatform()), Qt::UniqueConnection); -- GitLab