Skip to content

Commit

Permalink
[FEM] TaskBoxes: add missing info about transparency
Browse files Browse the repository at this point in the history
The user had no info about the current transparency nor the value he will be selecting.
  • Loading branch information
donovaly committed Jul 23, 2022
1 parent ed82bd1 commit 057e90b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Mod/Fem/Gui/TaskPostBoxes.cpp
Expand Up @@ -32,6 +32,8 @@

# include <QApplication>
# include <QMessageBox>
# include <QSlider>
# include <QToolTip>
#endif

#include <App/Document.h>
Expand Down Expand Up @@ -389,6 +391,7 @@ TaskPostDisplay::TaskPostDisplay(Gui::ViewProviderDocumentObject* view, QWidget*
Base::Console().Log("Transparency %i: \n", trans);
// sync the trancparency slider
ui->Transparency->setValue(trans);
ui->Transparency->setToolTip(QString::number(trans) + QString::fromLatin1(" %"));
}

TaskPostDisplay::~TaskPostDisplay()
Expand Down Expand Up @@ -421,6 +424,9 @@ void TaskPostDisplay::on_VectorMode_activated(int i) {
void TaskPostDisplay::on_Transparency_valueChanged(int i) {

getTypedView<ViewProviderFemPostObject>()->Transparency.setValue(i);
ui->Transparency->setToolTip(QString::number(i) + QString::fromLatin1(" %"));
// highlight the tooltip
QToolTip::showText(QCursor::pos(), QString::number(i) + QString::fromLatin1(" %"), nullptr);
}

void TaskPostDisplay::applyPythonCode() {
Expand Down

0 comments on commit 057e90b

Please sign in to comment.