mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-07 15:55:00 +00:00
remove: unused layer
This commit is contained in:
parent
7d46c7dcfd
commit
a0115ff54e
2 changed files with 2 additions and 4 deletions
|
@ -224,7 +224,7 @@ impl Pivot {
|
|||
self.pivot = Some(self.transform_from_normalized.transform_point2(self.normalized_pivot));
|
||||
}
|
||||
|
||||
pub fn recalculate_pivot_for_layer(&mut self, document: &DocumentMessageHandler, layer: LayerNodeIdentifier, bounds: Option<[DVec2; 2]>) {
|
||||
pub fn recalculate_pivot_for_layer(&mut self, document: &DocumentMessageHandler, bounds: Option<[DVec2; 2]>) {
|
||||
if !self.active {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ fn calculate_pivot(
|
|||
viewspace: DAffine2,
|
||||
get_location: impl Fn(&ManipulatorPointId) -> Option<DVec2>,
|
||||
dot: &mut Dot,
|
||||
layers: LayerNodeIdentifier,
|
||||
) -> (Option<(DVec2, DVec2)>, Option<[DVec2; 2]>) {
|
||||
let average_position = || {
|
||||
let mut point_count = 0;
|
||||
|
@ -89,7 +88,7 @@ fn calculate_pivot(
|
|||
Some([point, point])
|
||||
}
|
||||
});
|
||||
dot.pivot.recalculate_pivot_for_layer(document, layers, bounds);
|
||||
dot.pivot.recalculate_pivot_for_layer(document, bounds);
|
||||
let position = || {
|
||||
{
|
||||
if dot.state.enabled {
|
||||
|
@ -254,7 +253,6 @@ impl MessageHandler<TransformLayerMessage, TransformData<'_>> for TransformLayer
|
|||
viewspace,
|
||||
|point: &ManipulatorPointId| get_location(&point),
|
||||
&mut self.dot,
|
||||
selected_layers[0],
|
||||
) {
|
||||
*selected.pivot = new_pivot;
|
||||
self.path_bounds = bounds;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue