GP: Update Gizmo position when select
authorAntonioya <blendergit@gmail.com>
Wed, 19 Dec 2018 08:13:44 +0000 (09:13 +0100)
committerAntonioya <blendergit@gmail.com>
Wed, 19 Dec 2018 08:13:59 +0000 (09:13 +0100)
source/blender/editors/gpencil/gpencil_select.c

index cbe9d7e547ac1fbff9302cf0ad7af0fe32575c12..8b1f652f7c595ccd77479785f2e8d86bc57d7a9b 100644 (file)
@@ -200,6 +200,7 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op)
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -261,6 +262,7 @@ static int gpencil_select_linked_exec(bContext *C, wmOperator *op)
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -341,6 +343,7 @@ static int gpencil_select_alternate_exec(bContext *C, wmOperator *op)
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -497,6 +500,7 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -575,6 +579,7 @@ static int gpencil_select_first_exec(bContext *C, wmOperator *op)
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -649,6 +654,7 @@ static int gpencil_select_last_exec(bContext *C, wmOperator *op)
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -739,6 +745,7 @@ static int gpencil_select_more_exec(bContext *C, wmOperator *UNUSED(op))
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -824,6 +831,7 @@ static int gpencil_select_less_exec(bContext *C, wmOperator *UNUSED(op))
        DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -1016,6 +1024,7 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
                DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        }
 
        return OPERATOR_FINISHED;
@@ -1163,6 +1172,7 @@ static int gpencil_generic_select_exec(
                DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        }
 
        return OPERATOR_FINISHED;
@@ -1404,6 +1414,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
                DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
                DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
 
                return OPERATOR_CANCELLED;
        }
@@ -1461,6 +1472,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
                DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
+               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
        }
 
        return OPERATOR_FINISHED;