Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2015-08-14 23:19:14 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-08-14 23:23:06 +0300
commit119cda0a0d258b104b3b1ab0bbd9b26d83ad0a67 (patch)
treedebe653588145556ee632b3a7bb634de487ec2d3
parent9b729adb6e2e5158739dfeb5653ca3fb75cda599 (diff)
Cleanup: Avoid calling function twice
Own stupidness from rB17422124eca332
-rw-r--r--source/blender/editors/interface/interface_handlers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 0adbd05d269..4adc866d3a7 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);