mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Fixed behavior in GeometryView for multiple sources selected.
This commit is contained in:
18
View.cpp
18
View.cpp
@@ -370,14 +370,24 @@ void GeometryView::zoom( float factor )
|
||||
|
||||
void GeometryView::draw()
|
||||
{
|
||||
// hack to prevent source manipulation (scale and rotate)
|
||||
// when multiple sources are selected: simply do not draw overlay in scene
|
||||
Source *s = Mixer::manager().currentSource();
|
||||
if (s != nullptr) {
|
||||
if ( Mixer::selection().size() > 1) {
|
||||
s->setMode(Source::SELECTED);
|
||||
s = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// draw scene of this view
|
||||
scene.root()->draw(glm::identity<glm::mat4>(), Rendering::manager().Projection());
|
||||
|
||||
// draw overlay of current source
|
||||
Source *s = Mixer::manager().currentSource();
|
||||
// re-draw overlay of current source on top
|
||||
// (allows manipulation current source even when hidden below others)
|
||||
if (s != nullptr) {
|
||||
|
||||
DrawVisitor dv(s->overlays_[View::GEOMETRY], Rendering::manager().Projection());
|
||||
s->setMode(Source::CURRENT);
|
||||
DrawVisitor dv(s->overlays_[mode_], Rendering::manager().Projection());
|
||||
scene.accept(dv);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user