[Bf-blender-cvs] [119cda0] master: Cleanup: Avoid calling function twice
Julian Eisel
noreply at git.blender.org
Fri Aug 14 22:23:22 CEST 2015
Commit: 119cda0a0d258b104b3b1ab0bbd9b26d83ad0a67
Author: Julian Eisel
Date: Fri Aug 14 22:19:14 2015 +0200
Branches: master
https://developer.blender.org/rB119cda0a0d258b104b3b1ab0bbd9b26d83ad0a67
Cleanup: Avoid calling function twice
Own stupidness from rB17422124eca332
===================================================================
M source/blender/editors/interface/interface_handlers.c
===================================================================
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 0adbd05..4adc866 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -9703,14 +9703,15 @@ static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *UNUSE
uiBut *but_other;
uiHandleButtonData *data;
bool is_inside_menu = false;
+ const int shadow_xy = UI_ThemeMenuShadowWidth();
/* look for a popup menu containing the mouse */
for (ar_temp = screen->regionbase.first; ar_temp; ar_temp = ar_temp->next) {
rcti rect = ar_temp->winrct;
/* resize region rect to ignore shadow */
- BLI_rcti_resize(&rect, (BLI_rcti_size_x(&ar_temp->winrct) - UI_ThemeMenuShadowWidth() * 2),
- (BLI_rcti_size_y(&ar_temp->winrct) - UI_ThemeMenuShadowWidth() * 2));
+ BLI_rcti_resize(&rect, BLI_rcti_size_x(&ar_temp->winrct) - shadow_xy * 2,
+ BLI_rcti_size_y(&ar_temp->winrct) - shadow_xy * 2);
if (BLI_rcti_isect_pt_v(&rect, &event->x)) {
BLI_assert(ar_temp->type->regionid == RGN_TYPE_TEMPORARY);
More information about the Bf-blender-cvs
mailing list