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:
authorJulian Eisel <julianeisel@Julians-MacBook-Pro.local>2020-04-30 19:58:05 +0300
committerJulian Eisel <julian@blender.org>2020-04-30 20:20:01 +0300
commit8e08d80e52d6e1ab15e6b9726b5757fbaa2e6cf6 (patch)
treee2f03dea063777b1ff60c513c463450f31d14277 /source/blender/editors/interface/interface_panel.c
parentd44f323df5db147d12aaad673a761404cb19707a (diff)
Fix dragging panels changing region size
While dragging panels, the region size would change which would feel glitchy. See D7462 for a demo of the issue.
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index f824670cc57..911250891f0 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -876,6 +876,16 @@ static int get_panel_real_ofsx(Panel *panel)
}
}
+bool UI_panel_is_dragging(const struct Panel *panel)
+{
+ uiHandlePanelData *data = panel->activedata;
+ if (!data) {
+ return false;
+ }
+
+ return (data->state == PANEL_STATE_DRAG);
+}
+
typedef struct PanelSort {
Panel *panel, *orig;
} PanelSort;