summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--filter-accela/ftnoir_filter_accela_dialog.cpp4
-rw-r--r--spline/spline-widget.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/filter-accela/ftnoir_filter_accela_dialog.cpp b/filter-accela/ftnoir_filter_accela_dialog.cpp
index 3efc81d0..e8af130d 100644
--- a/filter-accela/ftnoir_filter_accela_dialog.cpp
+++ b/filter-accela/ftnoir_filter_accela_dialog.cpp
@@ -50,9 +50,9 @@ dialog_accela::dialog_accela()
QDialog dr, dt;
spline_widget r(&dr);
spline_widget t(&dt);
- dr.setWindowTitle("Accela rotation gain"); r.set_preview_only(true); r.setEnabled(false);
+ dr.setWindowTitle("Accela rotation gain"); r.set_preview_only(true); r.setEnabled(true);
r.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); r.setConfig(&rot);
- dt.setWindowTitle("Accela translation gain"); t.set_preview_only(true); t.setEnabled(false);
+ dt.setWindowTitle("Accela translation gain"); t.set_preview_only(true); t.setEnabled(true);
r.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); t.setConfig(&trans);
r.setFixedSize(1024, 600); t.setFixedSize(1024, 600);
diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp
index 1a39cc23..2a4c07c5 100644
--- a/spline/spline-widget.cpp
+++ b/spline/spline-widget.cpp
@@ -311,7 +311,7 @@ void spline_widget::drawLine(QPainter& painter, const QPoint& start, const QPoin
void spline_widget::mousePressEvent(QMouseEvent *e)
{
- if (!_config || !isEnabled() || !is_in_bounds(e->pos()))
+ if (!_config || !isEnabled() || !is_in_bounds(e->pos()) || _preview_only)
{
clearFocus();
return;
@@ -458,7 +458,7 @@ void spline_widget::mouseMoveEvent(QMouseEvent *e)
void spline_widget::mouseReleaseEvent(QMouseEvent *e)
{
- if (!_config || !isEnabled() || !isActiveWindow() || !hasFocus())
+ if (!_config || !isEnabled() || !isActiveWindow() || !hasFocus() || _preview_only)
{
clearFocus();
return;
@@ -519,7 +519,7 @@ void spline_widget::show_tooltip(const QPoint& pos, const QPointF& value_)
const QPoint pix(int(pos.x()) + add_x, int(pos.y()) + add_y);
QToolTip::showText(mapToGlobal(pix),
- QStringLiteral("value: %1x%2").arg(x).arg(y),
+ QStringLiteral("value: %1x%2").arg(x, 0, 'f', 2).arg(y, 0, 'f', 2),
this,
rect(),
0);