From f810eae7a0ed7d9ae4089ed5f4d6e7a5d995afa1 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 2 Aug 2020 17:41:22 +0200 Subject: [PATCH] New feature: repeat selection 1. "Select Next Item" will repeat the selection on the last single-click location or select the current transient selected (essentially like a single click) This feature is by default bound to "Space" 2. "Select Next Item too" will do the same, but add to the selection This feature is by default bound to "Shift+Space" --- src/laybasic/laybasic/layLayoutViewFunctions.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/laybasic/laybasic/layLayoutViewFunctions.cc b/src/laybasic/laybasic/layLayoutViewFunctions.cc index 5e58747a2..c7198ac11 100644 --- a/src/laybasic/laybasic/layLayoutViewFunctions.cc +++ b/src/laybasic/laybasic/layLayoutViewFunctions.cc @@ -84,6 +84,10 @@ LayoutViewFunctions::menu_activated (const std::string &symbol) view ()->select (db::DBox (), lay::Editable::Reset); } else if (symbol == "cm_select_all") { view ()->select (view ()->full_box (), lay::Editable::Replace); + } else if (symbol == "cm_select_next_item") { + view ()->repeat_selection (lay::Editable::Replace); + } else if (symbol == "cm_select_next_item_add") { + view ()->repeat_selection (lay::Editable::Add); } else if (symbol == "cm_lv_paste") { cm_layer_paste (); } else if (symbol == "cm_lv_cut") { @@ -2058,6 +2062,8 @@ public: menu_entries.push_back (lay::menu_item ("cm_paste_interactive", "paste_interactive:edit", at, tl::to_string (QObject::tr ("Paste Interactive")))); menu_entries.push_back (lay::menu_item ("cm_duplicate_interactive", "duplicate_interactive:edit", at, tl::to_string (QObject::tr ("Duplicate Interactive")))); menu_entries.push_back (lay::menu_item ("cm_sel_move_interactive", "sel_move_interactive:edit", at, tl::to_string (QObject::tr ("Move Interactive")))); + menu_entries.push_back (lay::menu_item ("cm_select_next_item", "select_next_item:edit", at, tl::to_string (QObject::tr ("Select Next Item(Space)")))); + menu_entries.push_back (lay::menu_item ("cm_select_next_item_add", "select_next_item_add:edit", at, tl::to_string (QObject::tr ("Select Next Item too(Shift+Space)")))); at = "edit_menu.end"; menu_entries.push_back (lay::menu_item ("cm_undo", "undo:edit", at, tl::to_string (QObject::tr ("Undo(Ctrl+Z)"))));