From cf2d3d08675ea5e04df8c305a2e2209db28b2332 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 18 Oct 2024 04:28:33 +0200 Subject: [PATCH] Fix: Docking Called from Shortcut Without Status Bar When starting a docking operation from an assigned shortcut, the source area will be incorrect if the Status Bar is not currently being shown. This PR just adds defaults that are never valid window coordinates. Pull Request: https://projects.blender.org/blender/blender/pulls/129187 --- source/blender/editors/screen/screen_ops.cc | 26 +++++---------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/source/blender/editors/screen/screen_ops.cc b/source/blender/editors/screen/screen_ops.cc index 0d114f50f75..596f6d3398b 100644 --- a/source/blender/editors/screen/screen_ops.cc +++ b/source/blender/editors/screen/screen_ops.cc @@ -4290,26 +4290,12 @@ static void SCREEN_OT_area_join(wmOperatorType *ot) ot->flag = OPTYPE_BLOCKING; /* rna */ - RNA_def_int_vector(ot->srna, - "source_xy", - 2, - nullptr, - INT_MIN, - INT_MAX, - "Source location", - "", - INT_MIN, - INT_MAX); - RNA_def_int_vector(ot->srna, - "target_xy", - 2, - nullptr, - INT_MIN, - INT_MAX, - "Target location", - "", - INT_MIN, - INT_MAX); + const int def[2] = {-100, -100}; + + RNA_def_int_vector( + ot->srna, "source_xy", 2, def, INT_MIN, INT_MAX, "Source location", "", INT_MIN, INT_MAX); + RNA_def_int_vector( + ot->srna, "target_xy", 2, def, INT_MIN, INT_MAX, "Target location", "", INT_MIN, INT_MAX); } /** \} */