You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PixelPaint: Make merge up and down actions work with disjoint layers
The "Merge Active Layer Up" and "Merge Active Layer Down" actions now
work with layers of different sizes. These actions now expand the
bounding rect of the newly merged layer to contain all layers being
merged. Layers which are not visible are now ignored by these actions.
auto error_message = layer_merge_direction == LayerMergeDirection::Up ? "No visible layers above this layer"sv : "No visible layers below this layer"sv;
433
+
returnError::from_string_view(error_message);
434
+
}
435
+
436
+
auto adjacent_layer = maybe_adjacent_layer.value();
437
+
auto bottom_layer = layer_merge_direction == LayerMergeDirection::Down ? adjacent_layer : layer;
438
+
auto top_layer = layer_merge_direction == LayerMergeDirection::Down ? layer : adjacent_layer;
439
+
auto merged_layer_bounding_rect = bottom_layer->relative_rect().united(top_layer->relative_rect());
440
+
auto merged_layer = bottom_layer;
441
+
if (!bottom_layer->relative_rect().contains(top_layer->relative_rect())) {
0 commit comments