mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fixed the duplication of background layer: the flags aren't copied.
Minor changes.
This commit is contained in:
parent
cf3521dfe8
commit
3ce0a8fc85
@ -1,5 +1,8 @@
|
||||
2008-05-05 David A. Capello <dacap@users.sourceforge.net>
|
||||
|
||||
* src/commands/cmd_duplicate_layer.c (duplicate_layer): Fixed the
|
||||
duplication of background layer: the flags aren't copied.
|
||||
|
||||
* src/script/functions.c (CropLayer): Rewritten (more simple).
|
||||
(CropSprite): Fixed to crop the background layer right.
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
<key command="goto_next_layer" shortcut="Up" />
|
||||
<!-- frame -->
|
||||
<key command="new_frame" shortcut="N" />
|
||||
<key command="frame_properties" shortcut="Shift+Ctrl+P" />
|
||||
<key command="frame_properties" shortcut="P" />
|
||||
<key command="goto_first_frame" shortcut="Home" />
|
||||
<key command="goto_previous_frame" shortcut="Left" />
|
||||
<key command="goto_next_frame" shortcut="Right" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!-- ASE - Allegro Sprite Editor -->
|
||||
<!-- Copyright (C) 2001-2008 by David A. Capello -->
|
||||
<jinete>
|
||||
<window text="Tools Setup" name="configure_tool">
|
||||
<window text="Tools Configuration" name="configure_tool">
|
||||
<box vertical>
|
||||
<box horizontal expansive>
|
||||
<box vertical>
|
||||
|
@ -68,6 +68,8 @@ static Layer *duplicate_layer(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
layer_copy->flags &= ~(LAYER_IS_LOCKMOVE | LAYER_IS_BACKGROUND);
|
||||
|
||||
sprintf(buf, "%s %s", layer_copy->name, _("Copy"));
|
||||
layer_set_name(layer_copy, buf);
|
||||
|
||||
|
@ -1258,13 +1258,17 @@ void jwidget_scroll(JWidget widget, JRegion region, int dx, int dy)
|
||||
{
|
||||
if (dx != 0 || dy != 0) {
|
||||
JRegion reg2 = jregion_new(NULL, 0);
|
||||
|
||||
|
||||
jregion_copy(reg2, region);
|
||||
jregion_translate(reg2, dx, dy);
|
||||
jregion_intersect(reg2, reg2, region);
|
||||
|
||||
jregion_translate(reg2, -dx, -dy);
|
||||
|
||||
jmouse_hide();
|
||||
ji_move_region(reg2, dx, dy);
|
||||
jmouse_show();
|
||||
|
||||
jregion_translate(reg2, dx, dy);
|
||||
|
||||
jregion_union(widget->update_region, widget->update_region, region);
|
||||
|
@ -161,9 +161,8 @@ void editor_set_scroll(JWidget widget, int x, int y, int use_refresh_region)
|
||||
JRegion region = NULL;
|
||||
int thick = editor->cursor_thick;
|
||||
|
||||
if (thick) {
|
||||
if (thick)
|
||||
editor_clean_cursor(widget);
|
||||
}
|
||||
|
||||
if (use_refresh_region) {
|
||||
region = jwidget_get_drawable_region(widget, JI_GDR_CUTTOPWINDOWS);
|
||||
@ -184,11 +183,9 @@ void editor_set_scroll(JWidget widget, int x, int y, int use_refresh_region)
|
||||
jview_get_scroll(view, &new_scroll_x, &new_scroll_y);
|
||||
|
||||
/* move screen with blits */
|
||||
jmouse_hide();
|
||||
jwidget_scroll(widget, region,
|
||||
old_scroll_x - new_scroll_x,
|
||||
old_scroll_y - new_scroll_y);
|
||||
jmouse_show();
|
||||
|
||||
jregion_free(region);
|
||||
/* editor->widget->flags &= ~JI_DIRTY; */
|
||||
@ -200,9 +197,8 @@ void editor_set_scroll(JWidget widget, int x, int y, int use_refresh_region)
|
||||
/* } */
|
||||
/* } */
|
||||
|
||||
if (thick) {
|
||||
if (thick)
|
||||
editor_draw_cursor(widget, editor->cursor_screen_x, editor->cursor_screen_y);
|
||||
}
|
||||
}
|
||||
|
||||
void editor_update(JWidget widget)
|
||||
|
@ -479,14 +479,16 @@ static void update_from_layer(StatusBar *statusbar)
|
||||
}
|
||||
|
||||
/* opacity layer */
|
||||
if (sprite && sprite->layer &&
|
||||
sprite->layer->gfxobj.type == GFXOBJ_LAYER_IMAGE &&
|
||||
if (sprite &&
|
||||
sprite->layer &&
|
||||
layer_is_image(sprite->layer) &&
|
||||
!layer_is_background(sprite->layer) &&
|
||||
(cel = layer_get_cel(sprite->layer, sprite->frame))) {
|
||||
jslider_set_value(statusbar->slider, MID(0, cel->opacity, 255));
|
||||
jwidget_enable(statusbar->slider);
|
||||
}
|
||||
else {
|
||||
jslider_set_value(statusbar->slider, 0);
|
||||
jslider_set_value(statusbar->slider, 255);
|
||||
jwidget_disable(statusbar->slider);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user