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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-19 16:35:40 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-19 16:35:40 +0400
commitaace6ef551183a3d09635c3103a8e4cba4f9117a (patch)
treeeea82219e48e722e97fb9964f6138f3bac646bfe /source/blender/windowmanager
parentc3041ae7cda20c78040e7deea17530fe5f41029d (diff)
2.5: Restored statistics in the info header.
Implementation: * NC_SCENE or NC_OBJECT cause scene->stats to be cleared. * NC_INFO is sent to tag info headers for redraw. * In UI scene.statistics() creates scene->stats if it is NULLd, and then returns the string.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_types.h1
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 00e9f6a2fa2..b717df8f61f 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -134,6 +134,7 @@ typedef struct wmNotifier {
#define NC_ANIMATION (15<<24)
#define NC_CONSOLE (16<<24)
#define NC_NODE (17<<24)
+#define NC_INFO (18<<24)
/* data type, 256 entries is enough, it can overlap */
#define NOTE_DATA 0x00FF0000
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index f0d9f8c0989..6c34ed6f902 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -52,6 +52,7 @@
#include "BKE_pointcache.h"
#include "ED_fileselect.h"
+#include "ED_info.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_util.h"
@@ -129,7 +130,7 @@ static wmNotifier *wm_notifier_next(wmWindowManager *wm)
void wm_event_do_notifiers(bContext *C)
{
wmWindowManager *wm= CTX_wm_manager(C);
- wmNotifier *note;
+ wmNotifier *note, *next;
wmWindow *win;
if(wm==NULL)
@@ -141,7 +142,9 @@ void wm_event_do_notifiers(bContext *C)
CTX_wm_window_set(C, win);
- for(note= wm->queue.first; note; note= note->next) {
+ for(note= wm->queue.first; note; note= next) {
+ next= note->next;
+
if(note->category==NC_WM) {
if( ELEM(note->data, ND_FILEREAD, ND_FILESAVE)) {
wm->file_saved= 1;
@@ -174,6 +177,10 @@ void wm_event_do_notifiers(bContext *C)
do_anim= 1;
}
}
+ if(note->category == NC_SCENE || note->category == NC_OBJECT) {
+ ED_info_stats_clear(CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_INFO, NULL);
+ }
}
if(do_anim) {
/* depsgraph gets called, might send more notifiers */