2.5 - compile fixes for Elubie's commit

This commit is contained in:
Joshua Leung 2008-12-03 22:35:38 +00:00
parent 6241b8a57f
commit 48cd47ab58
2 changed files with 4 additions and 12 deletions

@ -42,6 +42,8 @@
#include "BIF_gl.h" #include "BIF_gl.h"
#include "BIF_glutil.h" #include "BIF_glutil.h"
#include "ED_screen.h"
#include "UI_resources.h" #include "UI_resources.h"
#include "UI_view2d.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 */ /* Restore view matrices after drawing */
void UI_view2d_view_restore(const bContext *C) void UI_view2d_view_restore(const bContext *C)
{ {
ARegion *region= C->region; ED_region_pixelspace(C, 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);
} }
/* *********************************************************************** */ /* *********************************************************************** */

@ -56,7 +56,7 @@ void RNA_def_keyblock(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "CurrentValue", "Current Value."); RNA_def_property_ui_text(prop, "CurrentValue", "Current Value.");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); 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_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Type", ""); RNA_def_property_ui_text(prop, "Type", "");