From 29b1acc63f04ad845833785d5cd7c5f7642e6efb Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Wed, 15 Sep 2010 22:15:43 +0000 Subject: [PATCH] Fix an issue with the comments in file, was not working (since a recent change?) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1618 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/filesel.c | 2 +- src/loadsave.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/filesel.c b/src/filesel.c index ac70b457..a78a5164 100644 --- a/src/filesel.c +++ b/src/filesel.c @@ -1176,7 +1176,7 @@ byte Button_Load_or_Save(byte load, T_IO_Context *context) } // Affichage du commentaire if (Get_fileformat(Main_format)->Comment) - Print_in_window(47,70,context->Comment,MC_Black,MC_Light); + Print_in_window(45,70,context->Comment,MC_Black,MC_Light); } Window_set_normal_button(253,180,51,14,"Cancel",0,1,KEY_ESC); // 2 diff --git a/src/loadsave.c b/src/loadsave.c index ebfc4655..5a7ce0f3 100644 --- a/src/loadsave.c +++ b/src/loadsave.c @@ -363,12 +363,9 @@ void Pre_load(T_IO_Context *context, short width, short height, long file_size, { Print_in_window( 59,59,Get_fileformat(format)->Label,MC_Black,MC_Light); } - + // On efface le commentaire précédent Window_rectangle(45,70,32*8,8,MC_Light); - // Affichage du commentaire - if (Get_fileformat(format)->Comment) - Print_in_window(45,70,Main_comment,MC_Black,MC_Light); // Calcul des données nécessaires à l'affichage de la preview: if (ratio == PIXEL_WIDE && @@ -748,6 +745,9 @@ void Load_image(T_IO_Context *context) Main_backups->Pages->Gradients->Range[i].Inverse=context->Cycle_range[i].Inverse; Main_backups->Pages->Gradients->Range[i].Speed=context->Cycle_range[i].Speed; } + + // Comment + strcpy(Main_comment, context->Comment); } } @@ -873,9 +873,14 @@ void Load_image(T_IO_Context *context) context->Preview_pos_Y+y_pos, color); } - } + } // Refresh modified part Update_window_area(183,95,PREVIEW_WIDTH,PREVIEW_HEIGHT); + + // Preview comment + Print_in_window(45,70,context->Comment,MC_Black,MC_Light); + //Update_window_area(45,70,32*8,8); + } }