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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-18 16:15:13 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-18 16:15:13 +0400
commitd591f314f9a3dc1a0d16b9061f63373ff611dc24 (patch)
treeed1b6d70add87e5dbfa42ad4686f1ed43e52ddba /source
parent6ccf3402cb87f8635c431f573671fc0cc80a9737 (diff)
Fix T37705: texture panel order wrong when switching from cycles to blender render.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_panel.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index be6cbaf7b72..76d222f4bba 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -267,6 +267,11 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, Pan
}
}
+ /* ensure panels without header are at the top */
+ if (pt->flag & PNL_NO_HEADER) {
+ pa->sortorder = 0;
+ }
+
/* 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;
@@ -285,7 +290,16 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, Pan
break;
if (newpanel) {
- pa->sortorder = (palast) ? palast->sortorder + 1 : 0;
+ if (palast) {
+ pa->sortorder = palast->sortorder + 1;
+ }
+ else {
+ pa->sortorder = 0;
+
+ for (palast = ar->panels.first; palast; palast = palast->next)
+ if (pa->sortorder <= palast->sortorder)
+ pa->sortorder = palast->sortorder + 1;
+ }
for (panext = ar->panels.first; panext; panext = panext->next)
if (panext != pa && panext->sortorder >= pa->sortorder)
@@ -1002,7 +1016,6 @@ void uiScalePanels(ARegion *ar, float new_width)
for (block = ar->uiblocks.first; block; block = block->next) {
if (block->panel) {
float fac = new_width / (float)block->panel->sizex;
- printf("scaled %f\n", fac);
block->panel->sizex = new_width;
for (but = block->buttons.first; but; but = but->next) {