Fix T59001: UV Editor - Crash when hiding all UVs while 3D view is open
authorPhilipp Oeser <info@graphics-engineer.com>
Tue, 11 Dec 2018 13:50:03 +0000 (14:50 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Tue, 11 Dec 2018 14:39:43 +0000 (15:39 +0100)
and sync selection enabled

Reviewers: brecht

Maniphest Tasks: T59001

Differential Revision: https://developer.blender.org/D4066

source/blender/editors/uvedit/uvedit_ops.c

index db8a998688024cfcf0fcaf9d176d4f4551aef7dc..549096108505775402e64cc79954a8cb8c1db5fd 100644 (file)
@@ -4105,9 +4105,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
 
        if (ts->uv_flag & UV_SYNC_SELECTION) {
                EDBM_mesh_hide(em, swap);
 
        if (ts->uv_flag & UV_SYNC_SELECTION) {
                EDBM_mesh_hide(em, swap);
-
-               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
-               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+               EDBM_update_generic(em, true, false);
 
                return OPERATOR_FINISHED;
        }
 
                return OPERATOR_FINISHED;
        }
@@ -4230,8 +4228,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op)
        /* call the mesh function if we are in mesh sync sel */
        if (ts->uv_flag & UV_SYNC_SELECTION) {
                EDBM_mesh_reveal(em, select);
        /* call the mesh function if we are in mesh sync sel */
        if (ts->uv_flag & UV_SYNC_SELECTION) {
                EDBM_mesh_reveal(em, select);
-               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
-               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+               EDBM_update_generic(em, true, false);
 
                return OPERATOR_FINISHED;
        }
 
                return OPERATOR_FINISHED;
        }