From 05cb1db02021fc7e348f8f558051d5df5a042418 Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Wed, 17 Mar 2021 22:03:19 +0100 Subject: [PATCH] Minor UX improvement when mixing group rotation does not have the expected effect --- MixingGroup.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MixingGroup.cpp b/MixingGroup.cpp index d0904be..64fb59a 100644 --- a/MixingGroup.cpp +++ b/MixingGroup.cpp @@ -181,6 +181,7 @@ void MixingGroup::update (float) angle -= glm::orientedAngle( glm::normalize(pos_second), glm::vec2(1.f, 0.f) ); dist /= glm::length( pos_second ); + int numactions = 0; auto it = sources_.begin(); for (; it != sources_.end(); it++){ @@ -193,6 +194,7 @@ void MixingGroup::update (float) (*it)->group(View::MIXING)->translation_.x = vec.x; (*it)->group(View::MIXING)->translation_.y = vec.y; (*it)->touch(); + numactions++; } // update point @@ -200,6 +202,9 @@ void MixingGroup::update (float) } // update path lines_->changePath(p); + // no source was rotated? better action is thus to grab + if (numactions<1) + update_action_ = ACTION_GRAB_ALL; } // done