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:
authorTon Roosendaal <ton@blender.org>2003-12-30 19:00:38 +0300
committerTon Roosendaal <ton@blender.org>2003-12-30 19:00:38 +0300
commit6c80064ab7e0ea1e5ec9b5a164db08497a94ccf4 (patch)
treecd87729a1eb6ea68978ad87266c1fbcef54acbe3 /source
parent7d7fd069fc5feee0b8825d3c4b701c33195449d4 (diff)
- fixed switching contexts... the previous commit about this was too
rigurous. Now it only switches context when selecting a new object type, also "invisble", when shading buttons are not drawn. What I committed changed context always when pressing the 'shading context' icon button. This was annoying when you were editing textures or radiosity, world, etc. In such cases it should just draw the old settings.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/butspace.c7
-rw-r--r--source/blender/src/header_buttonswin.c8
2 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c
index 174eb2be0d6..1bb4d9e48ca 100644
--- a/source/blender/src/butspace.c
+++ b/source/blender/src/butspace.c
@@ -362,15 +362,14 @@ void redraw_test_buttons(Base *new)
if(ELEM5(buts->mainb, CONTEXT_OBJECT, CONTEXT_EDITING, CONTEXT_SHADING, CONTEXT_LOGIC, CONTEXT_SCRIPT)) {
addqueue(sa->win, REDRAW, 1);
buts->re_align= 1;
- }
- if(buts->mainb==CONTEXT_SHADING) {
- buts->re_align= 1;
if(new) {
- butspace_context_switch(buts, new);
BIF_preview_changed(buts);
}
}
+ // always to context switch
+ if(new) butspace_context_switch(buts, new);
+
}
sa= sa->next;
}
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c
index 0ae8a8d71a8..e2f80d0e900 100644
--- a/source/blender/src/header_buttonswin.c
+++ b/source/blender/src/header_buttonswin.c
@@ -184,10 +184,6 @@ void do_buts_buttons(short event)
allqueue(REDRAWBUTSEDIT, 0);
allqueue(REDRAWVIEW3D, 0);
break;
- case B_CONTEXT_SWITCH:
- butspace_context_switch(G.buts, BASACT);
- scrarea_queue_winredraw(curarea);
- break;
}
}
@@ -368,7 +364,7 @@ static uiBlock *sbuts_context_menu(void *arg_unused)
uiDefIconTextButS(block, BUTM, B_REDR, ICON_SCENE_DEHLT, "Scene|F10", 0, yco-=22, 100, 20, &G.buts->mainb, 0.0, 0.0, 0, 0, "");
uiDefIconTextButS(block, BUTM, B_REDR, ICON_EDIT, "Editing|F9", 0, yco-=22, 100, 20, &G.buts->mainb, 4.0, 0.0, 0, 0, "");
uiDefIconTextButS(block, BUTM, B_REDR, ICON_OBJECT, "Object|F6", 0, yco-=22, 100, 20, &G.buts->mainb, 1.0, 0.0, 0, 0, "");
- uiDefIconTextButS(block, BUTM, B_CONTEXT_SWITCH, ICON_MATERIAL_DEHLT, "Shading|F5", 0, yco-=22, 100, 20, &G.buts->mainb, 3.0, 0.0, 0, 0, "");
+ uiDefIconTextButS(block, BUTM, B_REDR, ICON_MATERIAL_DEHLT, "Shading|F5", 0, yco-=22, 100, 20, &G.buts->mainb, 3.0, 0.0, 0, 0, "");
uiDefIconTextButS(block, BUTM, B_REDR, ICON_GAME, "Logic|F4", 0, yco-=22, 100, 20, &G.buts->mainb, 6.0, 0.0, 0, 0, "");
uiDefIconTextButS(block, BUTM, B_REDR, ICON_SCRIPT, "Script", 0, yco-=22, 100, 20, &G.buts->mainb, 5.0, 0.0, 0, 0, "");
@@ -425,7 +421,7 @@ void buts_buttons(void)
uiBlockBeginAlign(block);
uiDefIconButS(block, ROW, B_REDR, ICON_GAME, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_LOGIC, 0, 0, "Logic (F4) ");
uiDefIconButS(block, ROW, B_REDR, ICON_SCRIPT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SCRIPT, 0, 0, "Script ");
- uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MATERIAL_DEHLT,xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SHADING, 0, 0, "Shading (F5) ");
+ uiDefIconButS(block, ROW, B_REDR, ICON_MATERIAL_DEHLT,xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SHADING, 0, 0, "Shading (F5) ");
uiDefIconButS(block, ROW, B_REDR, ICON_OBJECT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_OBJECT, 0, 0, "Object (F7) ");
uiDefIconButS(block, ROW, B_REDR, ICON_EDIT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_EDITING, 0, 0, "Editing (F9) ");
uiDefIconButS(block, ROW, B_REDR, ICON_SCENE_DEHLT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SCENE, 0, 0, "Scene (F10) ");