Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/default_keymap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<binding command="ToggleConsole" key=";"/>

<!-- selection -->
<binding command="SimplifySelection" key="Delete"/>
<binding command="DeleteSelection" key="Backspace"/>
<binding command="DeleteSelection" key="Delete"/>
<binding command="SelectAll" key="A" mod="CtrlMod"/>
<binding command="CopySelection" key="C" mod="CtrlMod"/>
<binding command="PasteSelection" key="V" mod="CtrlMod"/>
Expand Down
4 changes: 3 additions & 1 deletion src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub enum Command {
ToolImages,

// selection
SimplifySelection,
DeleteSelection,
SelectAll,
CopySelection,
Expand Down Expand Up @@ -114,7 +115,8 @@ impl Command {
| ToolMeasure | ToolAnchors | ToolShapes | ToolGuidelines | ToolImages => {
CommandType::ToolSelect
}
DeleteSelection
SimplifySelection
| DeleteSelection
| SelectAll
| CopySelection
| PasteSelection
Expand Down
9 changes: 4 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,11 @@ fn main() {
c.borrow_mut().active = true;
});
}*/
Command::SimplifySelection => {
editor.simplify_selection();
}
Command::DeleteSelection => {
if editor.selected.is_empty() && editor.point_idx.is_some() {
editor.simplify_selection();
} else {
editor.delete_selection();
}
editor.delete_selection();
}
Command::SelectAll => {} // handled by select tool, only when select active
Command::CopySelection => {
Expand Down