mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 10:19:59 +01:00
Bugfix recenter empty view
This commit is contained in:
4
View.cpp
4
View.cpp
@@ -123,6 +123,10 @@ void View::recenter()
|
||||
// restore default view
|
||||
restoreSettings();
|
||||
|
||||
// nothing else if scene is empty
|
||||
if (scene.ws()->numChildren() < 1)
|
||||
return;
|
||||
|
||||
// calculate screen area visible in the default view
|
||||
GlmToolkit::AxisAlignedBoundingBox view_box;
|
||||
glm::mat4 modelview = GlmToolkit::transform(scene.root()->translation_, scene.root()->rotation_, scene.root()->scale_);
|
||||
|
||||
Reference in New Issue
Block a user