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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-13 08:35:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-13 08:41:35 +0300
commit1abd120e70faddadad1b20e2b24dd5e03229806e (patch)
treeee23344f49fa42cf69a22a70db71dc80542b12d7 /source/blender/editors/interface/interface_region_popover.c
parentf1a65f5750d6a7ce040325af49863a15427d39b1 (diff)
Cleanup: rename uiBlock.mx,my to bounds_offset
Use a name that related to block bounds calculation (mx/my are typically used for mouse x,y).
Diffstat (limited to 'source/blender/editors/interface/interface_region_popover.c')
-rw-r--r--source/blender/editors/interface/interface_region_popover.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_region_popover.c b/source/blender/editors/interface/interface_region_popover.c
index 4fd25c4c7e2..e6e7cb33ad5 100644
--- a/source/blender/editors/interface/interface_region_popover.c
+++ b/source/blender/editors/interface/interface_region_popover.c
@@ -48,6 +48,7 @@
#include "BLI_rect.h"
#include "BLI_utildefines.h"
+#include "BLI_math_vector.h"
#include "BKE_context.h"
#include "BKE_screen.h"
@@ -161,12 +162,12 @@ static uiBlock *ui_block_func_POPOVER(bContext *C, uiPopupBlockHandle *handle, v
ui_block_to_window_fl(handle->ctx_region, pup->but->block, &center[0], &center[1]);
/* These variables aren't used for popovers,
* we could add new variables if there is a conflict. */
- handle->prev_mx = block->mx = (int)center[0];
- handle->prev_my = block->my = (int)center[1];
+ block->bounds_offset[0] = (int)center[0];
+ block->bounds_offset[1] = (int)center[1];
+ copy_v2_v2_int(handle->prev_bounds_offset, block->bounds_offset);
}
else {
- block->mx = handle->prev_mx;
- block->my = handle->prev_my;
+ copy_v2_v2_int(block->bounds_offset, handle->prev_bounds_offset);
}
if (!slideout) {
@@ -213,7 +214,7 @@ static uiBlock *ui_block_func_POPOVER(bContext *C, uiPopupBlockHandle *handle, v
}
}
- UI_block_bounds_set_popup(block, block_margin, offset[0], offset[1]);
+ UI_block_bounds_set_popup(block, block_margin, offset);
}
return block;