diff Framework/Viewport/WebAssemblyViewport.cpp @ 997:d6b83ee3a950

fix WebAssemblyOpenGLViewport::UpdateSize()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 20 Sep 2019 10:16:55 +0200
parents 91f827272c1f
children 6a9300ecfa13
line wrap: on
line diff
--- a/Framework/Viewport/WebAssemblyViewport.cpp	Thu Sep 19 18:26:11 2019 +0200
+++ b/Framework/Viewport/WebAssemblyViewport.cpp	Fri Sep 20 10:16:55 2019 +0200
@@ -43,9 +43,12 @@
 
   void WebAssemblyOpenGLViewport::UpdateSize()
   {
-    if(compositor_.get() != NULL)
+    context_.UpdateSize();  // First read the size of the canvas
+
+    if (compositor_.get() != NULL)
+    {
       compositor_->Refresh();  // Then refresh the content of the canvas
-    context_.UpdateSize();  // First read the size of the canvas
+    }
   }
 
   /*