diff --git a/src/engine.c b/src/engine.c index 1e0ca01f..9e424292 100644 --- a/src/engine.c +++ b/src/engine.c @@ -769,6 +769,38 @@ void Main_handler(void) Display_cursor(); action++; } + else if (Key == SHORTCUT_PASTE) /// @todo create a SPECIAL_ACTIONS for Copy and Paste ? + { + // simulate loading of Brush + T_IO_Context brush_context; + Init_context_brush(&brush_context, NULL, NULL); + brush_context.Format = FORMAT_CLIPBOARD; + Load_image(&brush_context); + if (File_error == 0) + { + strcpy(Brush_filename, "NO_NAME.GIF"); + Brush_filename_unicode[0] = 0; + Brush_fileformat = FORMAT_GIF; + + Tiling_offset_X=0; + Tiling_offset_Y=0; + + Brush_offset_X=(Brush_width>>1); + Brush_offset_Y=(Brush_height>>1); + + Select_button(BUTTON_DRAW,LEFT_SIDE); + if (Config.Auto_discontinuous) + { + // On se place en mode Dessin discontinu à la main + while (Current_operation!=OPERATION_DISCONTINUOUS_DRAW) + Select_button(BUTTON_DRAW,RIGHT_SIDE); + } + Hide_cursor(); + // On passe en brosse couleur: + Change_paintbrush_shape(PAINTBRUSH_SHAPE_COLOR_BRUSH); + } + Destroy_context(&brush_context); + } else if (Key) { effect_modified = 0; diff --git a/src/filesel.c b/src/filesel.c index ed76f1a3..9646cdf4 100644 --- a/src/filesel.c +++ b/src/filesel.c @@ -1735,9 +1735,9 @@ byte Button_Load_or_Save(T_Selector_settings *settings, byte load, T_IO_Context #if defined(WIN32) if (load) - Window_set_normal_button(62,180,115,14,"From Clipboard",0,1,MOD_CTRL|KEY_v); // 14 + Window_set_normal_button(62,180,115,14,"From Clipboard",0,1,SHORTCUT_PASTE); // 14 else - Window_set_normal_button(62,180,115,14,"To Clipboard",0,1,MOD_CTRL|KEY_c); // 14 + Window_set_normal_button(62,180,115,14,"To Clipboard",0,1,SHORTCUT_COPY); // 14 #endif Change_directory(context->File_directory);