mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-27 19:27:21 -06:00
#1063: a fill chosen with characters selected colours just them
Choosing a fill or stroke (Color panel, Swatches, the proxies) while the Type tool had a few characters selected painted every run of the type object. As in Illustrator, it now goes to the selected characters only: the runs are split at the selection's ends and the paint is placed on the runs in between, as one undo step; a stroke gets a 1 pt weight where it had none. With only a caret, or with explicit ids or an item, paint.setFill/setStroke behave as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
10f1c56a86
commit
75c587c8a0
@@ -542,7 +542,7 @@ enum Step {
|
||||
}
|
||||
|
||||
/// The Type tool's selected text while it edits (its typing session ends first: one undo step).
|
||||
fn editing_range(s: &mut Session) -> Result<Option<(NodeId, usize, usize)>> {
|
||||
pub(crate) fn editing_range(s: &mut Session) -> Result<Option<(NodeId, usize, usize)>> {
|
||||
let o = s.tool_options();
|
||||
let Some(id) = o.get("editing").and_then(Value::as_u64).map(NodeId) else { return Ok(None) };
|
||||
if super::edit::typing_in_progress(s) {
|
||||
|
||||
Reference in New Issue
Block a user