From 119a1bd27d3d3a020ef907d83444f9b5568ebd65 Mon Sep 17 00:00:00 2001 From: Oleg Alexandrov Date: Wed, 20 Oct 2021 20:49:18 -0700 Subject: [PATCH] When splitting a view, remember the orientation --- src/meshlab/mainwindow_RunTime.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 24de08f73..f0f8d07d4 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -438,6 +438,14 @@ void MainWindow::setSplit(QAction *qa) if(mvc) { GLArea *glwClone=new GLArea(this, mvc, ¤tGlobalParams); + + // Start the new view with the same orientation as the existing one + GLArea* glArea = mvc->currentView(); + if(glArea) { + QPair shotAndScale = glArea->shotFromTrackball(); + glwClone->loadShot(shotAndScale); + } + //connect(glwClone, SIGNAL(insertRenderingDataForNewlyGeneratedMesh(int)), this, SLOT(addRenderingDataIfNewlyGeneratedMesh(int))); if(qa->text() == tr("&Horizontally")) mvc->addView(glwClone,Qt::Vertical); @@ -454,7 +462,6 @@ void MainWindow::setSplit(QAction *qa) updateMenus(); - glwClone->resetTrackBall(); glwClone->update(); }