fix for "[#11004] Adding ram sound and alt-U causes ram to look like HD sound and...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 23 May 2008 09:58:33 +0000 (09:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 23 May 2008 09:58:33 +0000 (09:58 +0000)
Missing call sound_initialize_sounds, cant be added BKE_reset_undo since its in blenderkernel.

source/blender/blenkernel/intern/blender.c
source/blender/src/space.c

index 81f496e97d6dfbdeb518b2a3e0305e1e4980dc23..aca51e56c6e5363fd4d3cf84534abe0d5ce2a048 100644 (file)
@@ -621,7 +621,8 @@ void BKE_write_undo(char *name)
        }
 }
 
-/* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation */
+/* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation
+ * Note, ALWAYS call sound_initialize_sounds after BKE_undo_step() */
 void BKE_undo_step(int step)
 {
        
index 1d07bfbe22a6a65a6ede310f1f3549bb7f6d451b..47e3387755b223f4d041a36904b28728e37f30cd 100644 (file)
@@ -1080,7 +1080,10 @@ void BIF_undo_menu(void)
                        if(menu) {
                                short event= pupmenu_col(menu, 20);
                                MEM_freeN(menu);
-                               if(event>0) BKE_undo_number(event);
+                               if(event>0) {
+                                       BKE_undo_number(event);
+                                       sound_initialize_sounds();
+                               }
                        }
                }
        }