0025027: Visualization - 2D layer viewport is updated incorrectly on resize
authorkgv <kgv@opencascade.com>
Thu, 26 Jun 2014 08:50:30 +0000 (12:50 +0400)
committerapn <apn@opencascade.com>
Thu, 26 Jun 2014 08:51:04 +0000 (12:51 +0400)
Test case for issue CR25027

src/Visual3d/Visual3d_ViewManager.cxx
tests/bugs/vis/bug25027 [new file with mode: 0755]

index 5556256..e2a0dc7 100644 (file)
@@ -346,7 +346,7 @@ void Visual3d_ViewManager::Redraw() const
     {
       MyDefinedView.Value(i)->Window()->Size (aWidth, aHeight);
       aWidthMax  = Max (aWidthMax,  aWidth);
-      aHeightMax = Max (aHeightMax, aWidth);
+      aHeightMax = Max (aHeightMax, aHeight);
     }
 
     if (!MyUnderLayer.IsNull())
diff --git a/tests/bugs/vis/bug25027 b/tests/bugs/vis/bug25027
new file mode 100755 (executable)
index 0000000..52b44f0
--- /dev/null
@@ -0,0 +1,17 @@
+puts "============"
+puts "OCC25027"
+puts "============"
+puts ""
+#######################################################################
+# Visualization - 2D layer viewport is updated incorrectly on resize
+#######################################################################
+
+box b 1 2 3
+vinit w=1024 h=512
+vsetdispmode 1
+vdisplay b
+vfit
+vcolorscale 10 20 100 16 2 0 0
+vmoveto 512 250
+
+set only_screen 1