Skip to content
Snippets Groups Projects

Skill-Gui Stability and QOL

Merged Peter Albrecht requested to merge feature/skill-gui-stability into master
3 unresolved threads
1 file
+ 15
3
Compare changes
  • Side-by-side
  • Inline
#include "SkillDetailsTreeWidget.h"
#include <optional>
#include <QApplication>
@@ -6,6 +7,9 @@
#include <QHeaderView>
#include <QResizeEvent>
#include <QVBoxLayout>
#include <qchar.h>
#include <qmessagebox.h>
#include <ArmarXCore/core/logging/Logging.h>
#include <RobotAPI/libraries/aron/converter/json/NLohmannJSONConverter.h>
@@ -108,7 +112,9 @@ namespace armarx::skills::gui
// only triggers if the description does not match
if (descr != shownSkill->descr)
{
if (askUserToConfirmWidgetReset("The currently shown skill in the details widget has not been found in the latest manager update. Did the skill provider die?"))
if (askUserToConfirmWidgetReset(
"The currently shown skill in the details widget has not been found in the "
"latest manager update. Did the skill provider die?"))
{
this->updateContents(sid, descr);
}
@@ -131,9 +137,15 @@ namespace armarx::skills::gui
setColumnHidden(3, true);
}
bool SkillDetailsTreeWidget::askUserToConfirmWidgetReset(std::string reason)
bool
SkillDetailsTreeWidget::askUserToConfirmWidgetReset(std::string reason)
{
std::string msg = "The skill details widget will be reset.\nReason: " + reason;
QMessageBox msgBox;
msgBox.setText(QString::fromStdString(msg));
QPushButton* connectButton = msgBox.addButton(tr("Connect"), QMessageBox::ActionRole);
QPushButton* abortButton = msgBox.addButton(QMessageBox::Abort);
ARMARX_WARNING << "The skill details widget will be reset. Reason: " << reason;
return true;
}
Loading