diff --git a/Mixer.cpp b/Mixer.cpp index f51da5a..1fb112e 100644 --- a/Mixer.cpp +++ b/Mixer.cpp @@ -727,7 +727,7 @@ void Mixer::groupSelection() info << sessiongroup->name() << " inserted: " << sessiongroup->session()->numSource() << " sources flatten."; Action::manager().store(info.str()); - Log::Notify("Added group source '%s' with %s", sessiongroup->name().c_str(), sessiongroup->info().c_str()); + Log::Notify("Added source '%s' with %s", sessiongroup->name().c_str(), sessiongroup->info().c_str()); // give the hand to the user Mixer::manager().setCurrentSource(sessiongroup); @@ -772,24 +772,19 @@ void Mixer::groupAll() sessiongroup->group(View::MIXING)->translation_.x = 0.f; sessiongroup->group(View::MIXING)->translation_.y = 0.f; - // Add the session-group source to Session - session_->addSource(sessiongroup); - - // Attach the session-group source to Mixer - attach(sessiongroup); - // name the session-group source (avoid name duplicates) renameSource(sessiongroup, SystemToolkit::base_filename(session_->filename())); + // Add the session-group source in the mixer + // NB: sessiongroup will be updated and inserted to Mixing view on next frame + addSource(sessiongroup); + // store in action manager std::ostringstream info; info << sessiongroup->name() << " inserted: " << sessiongroup->session()->numSource() << " sources flatten."; Action::manager().store(info.str()); - Log::Notify("Added group source '%s' with %s", sessiongroup->name().c_str(), sessiongroup->info().c_str()); - - // give the hand to the user - Mixer::manager().setCurrentSource(sessiongroup); + Log::Notify("Added source '%s' with %s", sessiongroup->name().c_str(), sessiongroup->info().c_str()); } else { delete sessiongroup; @@ -834,7 +829,7 @@ void Mixer::flattenSession() // prevent deletion of session_ (now embedded into session group) session_ = new Session; - Log::Notify("Created group source '%s' with %s", sessiongroup->name().c_str(), sessiongroup->info().c_str()); + Log::Notify("Switched to '%s' with %s", sessiongroup->name().c_str(), sessiongroup->info().c_str()); } void Mixer::renameSource(Source *s, const std::string &newname) diff --git a/MixingView.cpp b/MixingView.cpp index 20ed444..0787bac 100644 --- a/MixingView.cpp +++ b/MixingView.cpp @@ -688,9 +688,9 @@ void MixingView::setAlpha(Source *s) if (!s) return; - // move the layer node of the source + // move the mixing node of the source Group *sourceNode = s->group(mode_); - glm::vec2 mix_pos = glm::vec2(DEFAULT_MIXING_TRANSLATION); + glm::vec2 mix_pos(sourceNode->translation_); for(NodeSet::iterator it = scene.ws()->begin(); it != scene.ws()->end(); ++it) { // avoid superposing icons: distribute equally diff --git a/Source.cpp b/Source.cpp index 80257d9..ab91099 100644 --- a/Source.cpp +++ b/Source.cpp @@ -133,7 +133,7 @@ Source::Source(uint64_t id) : SourceCore(), id_(id), ready_(false), symbol_(null // create groups and overlays for each view // default mixing nodes - groups_[View::MIXING]->scale_ = glm::vec3(0.15f, 0.15f, 1.f); + groups_[View::MIXING]->scale_ = glm::vec3(MIXING_ICON_SCALE); groups_[View::MIXING]->translation_ = glm::vec3(DEFAULT_MIXING_TRANSLATION, 0.f); frames_[View::MIXING] = new Switch;