From 9262c15cf27a0cc5f41016e433a710a0e72a3937 Mon Sep 17 00:00:00 2001 From: chrisf Date: Fri, 13 Jul 2007 15:22:38 +0000 Subject: [PATCH] git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1205 993157c7-ee19-0410-b2c4-bb4e9862e678 --- OpenRa.Game/MainWindow.cs | 2 +- OpenRa.Game/Sidebar.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index ed878dbe4b..0836b016c9 100644 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -93,7 +93,7 @@ namespace OpenRa.Game x1 = e.X; y1 = e.Y; - scrollPos.X = Util.Constrain( scrollPos.X, new Range(0, map.Width * 24 - ClientSize.Width)); + scrollPos.X = Util.Constrain(scrollPos.X, new Range(0, map.Width * 24 - ClientSize.Width)); scrollPos.Y = Util.Constrain(scrollPos.Y, new Range(0, map.Height * 24 - ClientSize.Height)); } } diff --git a/OpenRa.Game/Sidebar.cs b/OpenRa.Game/Sidebar.cs index b7880017c9..bd8c197801 100644 --- a/OpenRa.Game/Sidebar.cs +++ b/OpenRa.Game/Sidebar.cs @@ -48,6 +48,9 @@ namespace OpenRa.Game y += 48; } + if (vertices.Count == 0) + return; + renderer.DrawWithShader(ShaderQuality.Low, delegate { vertexBuffer.SetData(vertices.ToArray());