diff --git a/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp b/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp index 586ed0b602033e396a5398871bdd929cd6662235..0d2f71bc024dbec43e0c1275730a344b3ed007c5 100644 --- a/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp +++ b/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.cpp @@ -53,18 +53,16 @@ namespace armarx icon.addPixmap(iconNormal, QIcon::Normal, QIcon::Off); icon.addPixmap(iconDark, QIcon::Normal, QIcon::On); - layout = new QGridLayout(this->getWidget()); button = new QToolButton(); button->setCheckable(true); button->setIcon(icon); button->setIconSize(QSize(68, 28)); button->setToolTip(QString::fromStdString("Controls the EmergencyStop. When pressed the " "EmergencyStop is active. Shortcut: Pause Key")); - //button->setVisible(false); - layout->addWidget(button, 0, 0); - layout->setMargin(0); - layout->setContentsMargins(0, 0, 0, 0); - this->getWidget()->setLayout(layout); + button->setVisible(false); + QGridLayout* l = new QGridLayout(this->getWidget()); + this->getWidget()->setLayout(l); + this->getWidget()->layout()->addWidget(button); QShortcut* enableSS2Shortcut1 = new QShortcut(this->getWidget()); enableSS2Shortcut1->setContext(Qt::ApplicationShortcut); diff --git a/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.h b/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.h index 82727068ffb4e21657b88fb9eba845e78c0d6d0b..7b6573fbefce42f063599f73cea8073b8c46a5cb 100644 --- a/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.h +++ b/source/ArmarXGui/applications/ArmarXGui/Widgets/EmergencyStopWidget.h @@ -75,7 +75,6 @@ namespace armarx private: ArmarXMainWindow* mainWindow; - QGridLayout* layout; QPixmap iconNormal; QPixmap iconDark; QToolButton* button;