From bbc47e96d32b3594dd4fc6eef616d725a8bd75e5 Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Tue, 4 Sep 2007 20:27:43 +0000 Subject: == imagebrowser == - fix: deleting bookmark didn't update .Bfs file (see tracker #7298) - also fixed memleak, thanks to the guardedalloc :) --- source/blender/src/editimasel.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'source/blender/src/editimasel.c') diff --git a/source/blender/src/editimasel.c b/source/blender/src/editimasel.c index 506dadfe6bd..6111329e3e7 100644 --- a/source/blender/src/editimasel.c +++ b/source/blender/src/editimasel.c @@ -1058,15 +1058,18 @@ void winqreadimaselspace(ScrArea *sa, void *spacedata, BWinEvent *evt) case XKEY: getmouseco_areawin(mval); if (simasel->flag & FILE_BOOKMARKS) { - if(mval[0]>simasel->bookmarkrect.xmin && mval[0]bookmarkrect.xmax && mval[1]>simasel->bookmarkrect.ymin && mval[1]bookmarkrect.ymax) { - int nentries = fsmenu_get_nentries(); - set_active_bookmark(simasel, mval[1]); - if (simasel->active_bookmark >= 0 && simasel->active_bookmark < nentries) { - fsmenu_remove_entry(simasel->active_bookmark); - simasel->active_bookmark = -1; - do_draw = 1; - } + if(mval[0]>simasel->bookmarkrect.xmin && mval[0]bookmarkrect.xmax && mval[1]>simasel->bookmarkrect.ymin && mval[1]bookmarkrect.ymax) { + int nentries = fsmenu_get_nentries(); + set_active_bookmark(simasel, mval[1]); + if (simasel->active_bookmark >= 0 && simasel->active_bookmark < nentries) { + char name[FILE_MAX]; + BLI_make_file_string(G.sce, name, BLI_gethome(), ".Bfs"); + fsmenu_remove_entry(simasel->active_bookmark); + fsmenu_write_file(name); + simasel->active_bookmark = -1; + do_draw = 1; } + } } break; } -- cgit v1.2.3