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-09-09 21:34:14 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-09 21:34:14 +0400
commitd4a69283a60ae8f9e834f48ef7c2f3f68b51b73d (patch)
tree65ed384764b300ae4bf74eefa83ee34aa4736f0a
parent11c5cb452c32cc7dded241d71518d200edecb0b1 (diff)
2.5: fix for recent file operator opening wrong item.
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 0036db3824b..8cf47f0c682 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -803,7 +803,7 @@ static int recentfile_exec(bContext *C, wmOperator *op)
WM_read_file(C, G.sce, op->reports);
}
else {
- struct RecentFile *recent = BLI_findlink(&(G.recent_files), event-2);
+ struct RecentFile *recent = BLI_findlink(&(G.recent_files), event-1);
if(recent) {
WM_event_add_notifier(C, NC_WINDOW, NULL);
WM_read_file(C, recent->filename, op->reports);
@@ -831,11 +831,11 @@ static EnumPropertyItem *open_recentfile_itemf(bContext *C, PointerRNA *ptr, int
EnumPropertyItem tmp = {0, "", 0, "", ""};
EnumPropertyItem *item= NULL;
struct RecentFile *recent;
- int totitem= 0, i, ofs= 0;
+ int totitem= 0, i;
/* dynamically construct enum */
for(recent = G.recent_files.first, i=0; (i<U.recent_files) && (recent); recent = recent->next, i++) {
- tmp.value= i+ofs+1;
+ tmp.value= i+1;
tmp.identifier= recent->filename;
tmp.name= recent->filename;
RNA_enum_item_add(&item, &totitem, &tmp);