Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyhedron demo - fix DoubleEdit #7900

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Polyhedron/demo/Polyhedron/CGAL_double_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ class DoubleValidator : public QDoubleValidator
: QDoubleValidator(parent)
{
setLocale(QLocale::C);
setNotation(QDoubleValidator::StandardNotation);
}

void fixup ( QString & input ) const
{
input.replace(".", locale().decimalPoint());
input.replace(",", locale().decimalPoint());
QDoubleValidator::fixup(input);
// QDoubleValidator::fixup(input);
janetournois marked this conversation as resolved.
Show resolved Hide resolved
}
QValidator::State validate ( QString & input, int & pos ) const
{
Expand Down Expand Up @@ -59,7 +60,7 @@ class DoubleValidator : public QDoubleValidator

void DoubleEdit::setRange(double rmin, double rmax)
{
this->validator->setRange(rmin, rmax, this->validator->decimals());
this->validator->setRange(rmin, rmax, -1);
}

double DoubleEdit::getValue()
Expand Down
2 changes: 2 additions & 0 deletions Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
ui.approx->setRange(diag * 10e-7, // min
diag); // max
ui.approx->setValue(approx);
ui.approx->setToolTip(tr("Approximation error: in [%1; %2]")
.arg(diag * 10e-7).arg(diag));

ui.protect->setEnabled(features_protection_available);
ui.protect->setChecked(features_protection_available);
Expand Down