about summary refs log tree commit diff
path: root/src/game/editor/popups.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-01-08 01:47:53 +0100
committeroy <Tom_Adams@web.de>2012-01-08 01:47:53 +0100
commitbe37147342ff9032f0557d732abfc6cfd2c77efe (patch)
tree44b644a6ab37ea2dba8243056357a00fc5a03c43 /src/game/editor/popups.cpp
parent58f57795081e677e1450844bad1043b72c7c0bea (diff)
downloadzcatch-be37147342ff9032f0557d732abfc6cfd2c77efe.tar.gz
zcatch-be37147342ff9032f0557d732abfc6cfd2c77efe.zip
fixed border rendering in the editor's image preview. Closes #908
Diffstat (limited to 'src/game/editor/popups.cpp')
-rw-r--r--src/game/editor/popups.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp
index c19adb82..64d0c799 100644
--- a/src/game/editor/popups.cpp
+++ b/src/game/editor/popups.cpp
@@ -742,13 +742,14 @@ int CEditor::PopupSelectImage(CEditor *pEditor, CUIRect View)
 		ImageView.w *= pEditor->m_Map.m_lImages[ShowImage]->m_Width/Max;
 		ImageView.h *= pEditor->m_Map.m_lImages[ShowImage]->m_Height/Max;
 		pEditor->Graphics()->TextureSet(pEditor->m_Map.m_lImages[ShowImage]->m_TexID);
+		pEditor->Graphics()->BlendNormal();
+		pEditor->Graphics()->WrapClamp();
+		pEditor->Graphics()->QuadsBegin();
+		IGraphics::CQuadItem QuadItem(ImageView.x, ImageView.y, ImageView.w, ImageView.h);
+		pEditor->Graphics()->QuadsDrawTL(&QuadItem, 1);
+		pEditor->Graphics()->QuadsEnd();
+		pEditor->Graphics()->WrapNormal();
 	}
-	else
-		pEditor->Graphics()->TextureSet(-1);
-	pEditor->Graphics()->QuadsBegin();
-	IGraphics::CQuadItem QuadItem(ImageView.x, ImageView.y, ImageView.w, ImageView.h);
-	pEditor->Graphics()->QuadsDrawTL(&QuadItem, 1);
-	pEditor->Graphics()->QuadsEnd();
 
 	return 0;
 }