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>2021-11-02 11:35:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-11-02 11:35:17 +0300
commit69a7734b75c3044b760061a1141ba6dc95e419a6 (patch)
tree6b2e4fcd03176e3e922e3c0af0519d98c70dc895 /source/blender/editors/space_sequencer
parent2fb43f08e74cf1b209ba3f69d9e5e657beccc37f (diff)
UI: always show the cursor while transforming the cursor
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 7b763ac8540..ed8305cd311 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -775,6 +775,19 @@ static void sequencer_preview_region_view2d_changed(const bContext *C, ARegion *
sseq->flag &= ~SEQ_ZOOM_TO_FIT;
}
+static bool is_cursor_visible(const SpaceSeq *sseq)
+{
+ if (G.moving & G_TRANSFORM_CURSOR) {
+ return true;
+ }
+
+ if ((sseq->flag & SEQ_SHOW_OVERLAY) &&
+ (sseq->preview_overlay.flag & SEQ_PREVIEW_SHOW_2D_CURSOR) != 0) {
+ return true;
+ }
+ return false;
+}
+
static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
{
ScrArea *area = CTX_wm_area(C);
@@ -809,8 +822,7 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
}
/* No need to show the cursor for scopes. */
- if (draw_overlay && (is_playing == false) && (sseq->mainb == SEQ_DRAW_IMG_IMBUF) &&
- (sseq->preview_overlay.flag & SEQ_PREVIEW_SHOW_2D_CURSOR) != 0) {
+ if ((is_playing == false) && (sseq->mainb == SEQ_DRAW_IMG_IMBUF) && is_cursor_visible(sseq)) {
GPU_color_mask(true, true, true, true);
GPU_depth_mask(false);
GPU_depth_test(GPU_DEPTH_NONE);