summaryrefslogtreecommitdiffhomepage
path: root/spline/spline-widget.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-30 19:02:31 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-30 19:02:31 +0200
commit1bcd8d3369dac81d538ed926a596ed5b43b31682 (patch)
treeeae86e704e4d7776eda2abd9beccc44b0e5c203c /spline/spline-widget.cpp
parentfeeb385dcf41025981c37ed14256f27c33ea590f (diff)
spline: show tooltip in preview only mode
Diffstat (limited to 'spline/spline-widget.cpp')
-rw-r--r--spline/spline-widget.cpp6
1 files changed, 3 insertions, 3 deletions
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);