mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Improved behavior after source drop or creation (show mixing view with
highlight on new source)
This commit is contained in:
2
View.cpp
2
View.cpp
@@ -135,7 +135,7 @@ void MixingView::centerSource(Source *s)
|
||||
{
|
||||
// setup view so that the center of the source ends at screen coordinates (650, 150)
|
||||
// -> this is just next to the navigation pannel
|
||||
glm::vec2 screenpoint = glm::vec2(480.f, 40.f) * Rendering::manager().mainWindow().dpiScale();
|
||||
glm::vec2 screenpoint = glm::vec2(500.f, 20.f) * Rendering::manager().mainWindow().dpiScale();
|
||||
glm::vec3 pos_to = Rendering::manager().unProject(screenpoint, scene.root()->transform_);
|
||||
glm::vec3 pos_from( - s->group(View::MIXING)->scale_.x, s->group(View::MIXING)->scale_.y, 0.f);
|
||||
pos_from += s->group(View::MIXING)->translation_;
|
||||
|
||||
Reference in New Issue
Block a user