mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
BugFix: double-clic selection of mixing group crash
Improved CTRL+Clic for mixing group selection instead.
This commit is contained in:
@@ -442,8 +442,15 @@ std::pair<Node *, glm::vec2> MixingView::pick(glm::vec2 P)
|
|||||||
if (UserInterface::manager().ctrlModifier()) {
|
if (UserInterface::manager().ctrlModifier()) {
|
||||||
SourceList linked = s->mixinggroup_->getCopy();
|
SourceList linked = s->mixinggroup_->getCopy();
|
||||||
linked.remove(s);
|
linked.remove(s);
|
||||||
if (Mixer::selection().empty())
|
if (linked.size() > 0) {
|
||||||
Mixer::selection().add(linked);
|
// avoid de-selection of current source if in a mixing group
|
||||||
|
if (Mixer::selection().contains(s) && Mixer::selection().size() < 2)
|
||||||
|
Mixer::selection().clear();
|
||||||
|
// instead, select all sources linked
|
||||||
|
if (Mixer::selection().empty())
|
||||||
|
Mixer::selection().add(linked);
|
||||||
|
// the source will be re-selected in UserInterface::handleMouse()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (UserInterface::manager().shiftModifier())
|
else if (UserInterface::manager().shiftModifier())
|
||||||
s->mixinggroup_->setAction( MixingGroup::ACTION_GRAB_ONE );
|
s->mixinggroup_->setAction( MixingGroup::ACTION_GRAB_ONE );
|
||||||
|
|||||||
@@ -565,12 +565,7 @@ void UserInterface::handleMouse()
|
|||||||
// discard current to select front most source
|
// discard current to select front most source
|
||||||
// (because single clic maintains same source active)
|
// (because single clic maintains same source active)
|
||||||
Mixer::manager().unsetCurrentSource();
|
Mixer::manager().unsetCurrentSource();
|
||||||
else {
|
|
||||||
MixingGroup *g = Mixer::manager().currentSource()->mixingGroup();
|
|
||||||
if (g != nullptr){
|
|
||||||
Mixer::selection().set( g->getCopy() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// display source in left pannel
|
// display source in left pannel
|
||||||
navigator.showPannelSource( Mixer::manager().indexCurrentSource() );
|
navigator.showPannelSource( Mixer::manager().indexCurrentSource() );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user