- redo now also ctrl+y.
authorTon Roosendaal <ton@blender.org>
Sat, 18 Sep 2004 18:34:50 +0000 (18:34 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 18 Sep 2004 18:34:50 +0000 (18:34 +0000)
- made undo/redo display of previewrender nice

source/blender/blenloader/intern/readfile.c
source/blender/src/previewrender.c
source/blender/src/space.c
source/blender/src/toets.c

index f75af94ea4f7bc433b9d9670cee6beb5030662e6..697f281a94809d6d63ff8254ae765ba2f33f8bf6 100644 (file)
@@ -2569,7 +2569,7 @@ static void lib_link_screen(FileData *fd, Main *main)
                                                if(v3d->bgpic) {
                                                        v3d->bgpic->ima= newlibadr_us(fd, sc->id.lib, v3d->bgpic->ima);
                                                        v3d->bgpic->tex= newlibadr_us(fd, sc->id.lib, v3d->bgpic->tex);
-                                                       v3d->bgpic->rect= 0;
+                                                       v3d->bgpic->rect= NULL;
                                                }
                                                if(v3d->localvd) {
                                                        v3d->localvd->camera= newlibadr(fd, sc->id.lib, v3d->localvd->camera);
@@ -2712,8 +2712,7 @@ void lib_link_screen_restore(Main *newmain, char mode, Scene *curscene)
                                else if(sl->spacetype==SPACE_BUTS) {
                                        SpaceButs *sbuts= (SpaceButs *)sl;
                                        sbuts->lockpoin= NULL;
-                                       if(sbuts->rect) MEM_freeN(sbuts->rect);
-                                       sbuts->rect= NULL;
+                                       sbuts->cury= 0; // we leave rect, for nicer redraws
                                }
                                else if(sl->spacetype==SPACE_FILE) {
                                        SpaceFile *sfile= (SpaceFile *)sl;
index ed73a520a50656a5e725d9f94f82e6f49ffc3b06..4db3f79591054b97a66b2736a2fc643a1a719148 100644 (file)
@@ -344,6 +344,7 @@ void BIF_all_preview_changed(void)
 /* signal all previews in current screen of current type */
 void BIF_preview_changed(SpaceButs *sbuts)
 {
+
        /* can be called when no buttonswindow visible */
        if(sbuts) {
                ScrArea *sa;
index 2ade584c712588b5cd1351349a99368e3d4416c9..8d864567cf0f6ed91c4198e1aa85ef710d8d1850 100644 (file)
@@ -1538,8 +1538,7 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                                        else if(G.f & G_VERTEXPAINT)
                                                vpaint_undo();
                                        else {
-                                               if(U.uiflag & USER_GLOBALUNDO) BIF_undo();
-                                               else single_user();
+                                               single_user();
                                        }
                                }
                                else if(G.qual==LR_SHIFTKEY)
index dde0fc834a173f44edef08381d17efbe66c3e7ae..02717e86e3029caf4d07e1ba6b852b5bcc379cb4 100644 (file)
@@ -967,6 +967,12 @@ int blenderqread(unsigned short event, short val)
                        }
                }
                break;
+       case YKEY:      // redo alternative
+               if(G.qual==LR_CTRLKEY) {
+                       BIF_redo(); 
+                       return 0;
+               }
+               break;
        case ZKEY:      // undo
                if(G.qual & (LR_CTRLKEY|LR_COMMANDKEY)) { // all combos with ctrl/cammandkey are accepted
                        if ELEM(G.qual, LR_CTRLKEY, LR_COMMANDKEY) BIF_undo();