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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-12-13 16:17:57 +0400
committerTon Roosendaal <ton@blender.org>2012-12-13 16:17:57 +0400
commita63f0d320b4fb9351ebfd525b6c13d98dda25a15 (patch)
treed7b6b15e0968ac59baf995762639befd1d0ed003 /source
parent0f97d53c74b7b1c4a0b3e17a1ee66c04577fdd8a (diff)
Bugfix [#33511]
Overlapping regions: when dragging the region to close them, it started the blending timer - which of course is not meant to happen.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/screen/area.c17
-rw-r--r--source/blender/editors/screen/screen_intern.h1
-rw-r--r--source/blender/editors/screen/screen_ops.c4
3 files changed, 15 insertions, 7 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 80270116a13..a0bcab118f5 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1257,25 +1257,32 @@ void ED_region_init(bContext *C, ARegion *ar)
glLoadIdentity();
}
-void ED_region_toggle_hidden(bContext *C, ARegion *ar)
+/* for quick toggle, can skip fades */
+void region_toggle_hidden(bContext *C, ARegion *ar, int do_fade)
{
ScrArea *sa = CTX_wm_area(C);
-
+
ar->flag ^= RGN_FLAG_HIDDEN;
-
- if (ar->overlap) {
+
+ if (do_fade && ar->overlap) {
/* starts a timer, and in end calls the stuff below itself (region_sblend_invoke()) */
region_blend_start(C, sa, ar);
}
else {
if (ar->flag & RGN_FLAG_HIDDEN)
WM_event_remove_handlers(C, &ar->handlers);
-
+
ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
ED_area_tag_redraw(sa);
}
}
+/* exported to all editors, uses fading default */
+void ED_region_toggle_hidden(bContext *C, ARegion *ar)
+{
+ region_toggle_hidden(C, ar, 1);
+}
+
/* sa2 to sa1, we swap spaces for fullscreen to keep all allocated data */
/* area vertices were set */
void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h
index 2e2b53f57d6..b811fc46188 100644
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@ -39,6 +39,7 @@ struct Scene;
/* area.c */
void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space);
+void region_toggle_hidden(bContext *C, ARegion *ar, int do_fade);
/* screen_edit.c */
ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index fef039bc196..807c5a4c457 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1786,7 +1786,7 @@ static void region_scale_validate_size(RegionMoveData *rmd)
static void region_scale_toggle_hidden(bContext *C, RegionMoveData *rmd)
{
- ED_region_toggle_hidden(C, rmd->ar);
+ region_toggle_hidden(C, rmd->ar, 0);
region_scale_validate_size(rmd);
}
@@ -3594,7 +3594,7 @@ typedef struct RegionAlphaInfo {
int hidden;
} RegionAlphaInfo;
-#define TIMEOUT 0.3f
+#define TIMEOUT 0.2f
#define TIMESTEP 0.04f
float ED_region_blend_factor(ARegion *ar)