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:
authorTon Roosendaal <ton@blender.org>2004-06-19 16:25:28 +0400
committerTon Roosendaal <ton@blender.org>2004-06-19 16:25:28 +0400
commit6fdea0ffe70dd0c0b4e82140316037e57b0b527a (patch)
tree330efe1124b9959ab71aa8d776c8d450a0facb53 /source/blender/src/interface_panel.c
parent8617ce51417a671f55d3904f16b42604da7889c7 (diff)
Popular request: the floating panels (NKEY) now close on a 2nd NKEY command.
This for all current NKEY menus by default. Can be standard for each hotkey controlled Panel from now on; use toggle_blockhandler() for it. Another popular request: hotkey enabled Panels now optionally reopen on the previous location, instead of under mouse. This option "Pinned" is a user option now. Optional for later; have it as per-panel option... dunno! The last request, close on mouse-exit, won't be implemented, this intrudes with Panel consistancy, and is pretty OK solved with NKEY-NKEY now.
Diffstat (limited to 'source/blender/src/interface_panel.c')
-rw-r--r--source/blender/src/interface_panel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/src/interface_panel.c b/source/blender/src/interface_panel.c
index f0834fba869..6ee216c8788 100644
--- a/source/blender/src/interface_panel.c
+++ b/source/blender/src/interface_panel.c
@@ -420,7 +420,9 @@ int uiNewPanel(ScrArea *sa, uiBlock *block, char *panelname, char *tabname, int
pa->active= 1;
pa->control= pnl_control;
- if(pnl_control & UI_PNL_TO_MOUSE) {
+ /* global control over this feature; UI_PNL_TO_MOUSE only called for hotkey panels */
+ if(U.uiflag & USER_PANELPINNED);
+ else if(pnl_control & UI_PNL_TO_MOUSE) {
short mval[2];
Mat4CpyMat4(UIwinmat, block->winmat); // can be first event here