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:
-rw-r--r--source/blender/editors/screen/area.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 428f17886ec..be76e153fae 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -498,11 +498,16 @@ static void region_azone_edge(AZone *az, ARegion *ar)
static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
{
AZone *azt;
+ int tot=0;
+
+ for(azt= sa->actionzones.first; azt; azt= azt->next) {
+ if(azt->edge == az->edge) tot++;
+ }
if(az->edge=='t') {
- az->x1= ar->winrct.xmax - AZONEPAD_ICON;
+ az->x1= ar->winrct.xmax - tot*2*AZONEPAD_ICON;
az->y1= ar->winrct.ymax + AZONEPAD_ICON;
- az->x2= ar->winrct.xmax - 2*AZONEPAD_ICON;
+ az->x2= ar->winrct.xmax - tot*AZONEPAD_ICON;
az->y2= ar->winrct.ymax + 2*AZONEPAD_ICON;
}
else if(az->edge=='b') {
@@ -513,15 +518,15 @@ static void region_azone_icon(ScrArea *sa, AZone *az, ARegion *ar)
}
else if(az->edge=='l') {
az->x1= ar->winrct.xmin - 2*AZONEPAD_ICON;
- az->y1= ar->winrct.ymax - 2*AZONEPAD_ICON;
+ az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
az->x2= ar->winrct.xmin - AZONEPAD_ICON;
- az->y2= ar->winrct.ymax - AZONEPAD_ICON;
+ az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
}
else { // if(az->edge=='r') {
az->x1= ar->winrct.xmax + AZONEPAD_ICON;
- az->y1= ar->winrct.ymax - 2*AZONEPAD_ICON;
+ az->y1= ar->winrct.ymax - tot*2*AZONEPAD_ICON;
az->x2= ar->winrct.xmax + 2*AZONEPAD_ICON;
- az->y2= ar->winrct.ymax - AZONEPAD_ICON;
+ az->y2= ar->winrct.ymax - tot*AZONEPAD_ICON;
}
BLI_init_rcti(&az->rect, az->x1, az->x2, az->y1, az->y2);