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:
authorBastien Montagne <montagne29@wanadoo.fr>2013-01-28 12:58:20 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-01-28 12:58:20 +0400
commit9b2c0f03dd64f2c3c5dc41a1d2e388acf53983d0 (patch)
treeede5d1d32cf9ebec5d597bb61b3e31c6c269b2ed /source/blender/editors/interface/interface_panel.c
parent2e822e30b17d9cdd67fd21b1d1f6a29e5c64c985 (diff)
Fix for a nasty glicth found by Irie Shinsuke in Freestyle branch.
Headerless panels are not supposed to be closed ever. But if user saves a blend with a stardard panel closed, then dev decides to make this panel headerless, when user open again its blend, the panel is closed and has no more header, so it becomes invisible! This commit simply checks, at draw time, that a headerless panel is never closed (and repoen it if necessary)!
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 00c45e41587..c2c1de9cbd7 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -247,6 +247,14 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int
}
}
+ /* Do not allow closed panels without headers! Else user could get "disappeared" UI! */
+ if ((pt->flag & PNL_NO_HEADER) && (pa->flag & PNL_CLOSED)) {
+ pa->flag &= ~PNL_CLOSED;
+ /* Force update of panels' positions! */
+ pa->sizex = 0;
+ pa->sizey = 0;
+ }
+
BLI_strncpy(pa->drawname, drawname, UI_MAX_NAME_STR);
/* if a new panel is added, we insert it right after the panel