From 48cd47ab5899d719d4dc043db7a846e56c2684dc Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 3 Dec 2008 22:35:38 +0000 Subject: [PATCH] 2.5 - compile fixes for Elubie's commit --- source/blender/editors/interface/view2d.c | 14 +++----------- source/blender/makesrna/intern/rna_key.c | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index c98b88da1c2..81ef806b648 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -42,6 +42,8 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "ED_screen.h" + #include "UI_resources.h" #include "UI_view2d.h" @@ -363,17 +365,7 @@ void UI_view2d_view_orthospecial(const bContext *C, View2D *v2d, short xaxis) /* Restore view matrices after drawing */ void UI_view2d_view_restore(const bContext *C) { - ARegion *region= C->region; - int winx, winy; - - /* calculate extents of region */ - winx= region->winrct.xmax - region->winrct.xmin; - winy= region->winrct.ymax - region->winrct.ymin; - - /* set default region matrix - pixel offsets (0.375) for 1:1 correspondance are not applied, - * as they were causing some unwanted offsets when drawing - */ - wmOrtho2(C->window, 0, winx, 0, winy); + ED_region_pixelspace(C, C->region); } /* *********************************************************************** */ diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 27d471a61e7..19cca60d5a4 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -56,7 +56,7 @@ void RNA_def_keyblock(BlenderRNA *brna) RNA_def_property_ui_text(prop, "CurrentValue", "Current Value."); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "type", 0); + RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_keyblock_type_items); RNA_def_property_ui_text(prop, "Type", "");