]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for "0053112: 'Clone View' does not copy camera position into new viewer" issue. ana/53112
authorana <ana@opencascade.com>
Tue, 6 Sep 2016 09:34:30 +0000 (12:34 +0300)
committerana <ana@opencascade.com>
Tue, 6 Sep 2016 09:34:30 +0000 (12:34 +0300)
src/OCCViewer/OCCViewer_ViewWindow.cxx

index 52d5c837657edd23f3f5b909da66e0d9cf02b668..5f7c09b9c84e04147a3fa60fbeea4a8e08a41375 100644 (file)
@@ -24,6 +24,7 @@
 // Author :
 
 #include "OCCViewer_ViewWindow.h"
+#include "OCCViewer_ViewFrame.h"
 #include "OCCViewer_ViewModel.h"
 #include "OCCViewer_ViewPort3d.h"
 #include "OCCViewer_ViewManager.h"
@@ -1917,6 +1918,10 @@ void OCCViewer_ViewWindow::onCloneView()
   SUIT_ViewWindow* vw = myManager->createViewWindow();
   //vw->show();
   emit viewCloned( vw );
+  OCCViewer_ViewWindow* occVw = dynamic_cast<OCCViewer_ViewWindow*> (vw);
+  if(occVw && occVw->getView(OCCViewer_ViewFrame::MAIN_VIEW)) {
+    occVw->getView(OCCViewer_ViewFrame::MAIN_VIEW)->synchronize(this);
+  }
 }
 
 /*!