mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 15:08:12 +08:00
Refactor font loading from per-document to the portfolio (#659)
* Cleanup default font loading * Refactor fonts * Fix menulist mouse navigation * Format * Formatting * Move default font into consts.rs Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
7a9c3c958d
commit
469e40d4e9
@@ -9,7 +9,7 @@ use std::cell::RefCell;
|
||||
use std::fmt::{self, Debug, Formatter};
|
||||
use std::mem::swap;
|
||||
|
||||
#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq)]
|
||||
pub enum BooleanOperation {
|
||||
Union,
|
||||
Difference,
|
||||
@@ -507,10 +507,10 @@ pub fn composite_boolean_operation(mut select: BooleanOperation, shapes: &mut Ve
|
||||
}
|
||||
BooleanOperation::SubtractFront => {
|
||||
let mut result = vec![shapes[0].borrow().clone()];
|
||||
for shape_idx in 1..shapes.len() {
|
||||
for shape_idx in shapes.iter().skip(1) {
|
||||
let mut temp = Vec::new();
|
||||
for mut partial in result {
|
||||
match boolean_operation(select, &mut partial, &mut shapes[shape_idx].borrow_mut()) {
|
||||
match boolean_operation(select, &mut partial, &mut shape_idx.borrow_mut()) {
|
||||
Ok(mut partial_result) => temp.append(&mut partial_result),
|
||||
Err(BooleanOperationError::NothingDone) => temp.push(partial),
|
||||
Err(err) => return Err(err),
|
||||
|
||||
Reference in New Issue
Block a user