diff options
author | Ton Roosendaal <ton@blender.org> | 2011-06-04 21:03:46 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-06-04 21:03:46 +0400 |
commit | 88676349a473020937ba5f2637535bf5960059c9 (patch) | |
tree | cb02be5fea2f127b284430508fcab3de959c37d7 /source/blender/blenkernel/intern/blender.c | |
parent | 4a59928484b93a6c3876c0c8b065f6d313640804 (diff) |
Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
- name "Undo History"
- hotkey alt+ctrl+z (alt+apple+z for mac)
- works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
- for small windows or screens, popup menus now allow to display
all items, using internal scrolling
- works with a timer, scrolling 10 items per second when mouse
is over the top or bottom arrow
- if menu is too big to display, it now draws to top or bottom,
based on largest available space.
- also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
- widgets & headers now become bigger and smaller, to match
'dpi' font sizes. Works well to match UI to monitor size.
- note that icons can get fuzzy, we need better mipmaps for it
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index b852629e49c..20b44b3b899 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -620,7 +620,7 @@ void BKE_reset_undo(void) /* based on index nr it does a restore */ void BKE_undo_number(bContext *C, int nr) { - curundo= BLI_findlink(&undobase, nr - 1); + curundo= BLI_findlink(&undobase, nr); BKE_undo_step(C, 0); } @@ -646,6 +646,21 @@ int BKE_undo_valid(const char *name) return undobase.last != undobase.first; } +/* get name of undo item, return null if no item with this index */ +/* if active pointer, set it to 1 if true */ +char *BKE_undo_get_name(int nr, int *active) +{ + UndoElem *uel= BLI_findlink(&undobase, nr); + + if(active) *active= 0; + + if(uel) { + if(active && uel==curundo) + *active= 1; + return uel->name; + } + return NULL; +} char *BKE_undo_menu_string(void) { |