Fix: region toggle operator being able to toggle regions it shouldn't

Only regions with alignment set should be toggle-able. If this is not
set, then the region is likely either a main region, or entirely hidden
by the user (not just collapsed).
This commit is contained in:
Julian Eisel
2019-10-08 10:50:43 +02:00
parent ad876e728c
commit b1f1c8c33f

View File

@@ -3946,7 +3946,7 @@ static int region_toggle_exec(bContext *C, wmOperator *op)
region = CTX_wm_region(C);
}
if (region) {
if (region && (region->alignment != RGN_ALIGN_NONE)) {
ED_region_toggle_hidden(C, region);
}
ED_region_tag_redraw(region);