File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1307,6 +1307,22 @@ void ProjectList::select_first_visible_project() {
13071307 }
13081308}
13091309
1310+ void ProjectList::deselect_all_visible_projects () {
1311+ for (int i = 0 ; i < _projects.size (); i++) {
1312+ if (_projects[i].control ->is_visible ()) {
1313+ _deselect_project_nocheck (i);
1314+ }
1315+ }
1316+ }
1317+
1318+ void ProjectList::select_all_visible_projects () {
1319+ for (int i = 0 ; i < _projects.size (); i++) {
1320+ if (_projects[i].control ->is_visible ()) {
1321+ _select_project_nocheck (i);
1322+ }
1323+ }
1324+ }
1325+
13101326Vector<ProjectList::Item> ProjectList::get_selected_projects () const {
13111327 Vector<Item> items;
13121328 if (_selected_project_paths.is_empty ()) {
Original file line number Diff line number Diff line change @@ -309,6 +309,8 @@ class ProjectList : public ScrollContainer {
309309 void select_project (int p_index);
310310 void deselect_project (int p_index);
311311 void select_first_visible_project ();
312+ void select_all_visible_projects ();
313+ void deselect_all_visible_projects ();
312314 Vector<Item> get_selected_projects () const ;
313315 const HashSet<String> &get_selected_project_keys () const ;
314316 int get_single_selected_index () const ;
Original file line number Diff line number Diff line change @@ -1248,6 +1248,16 @@ void ProjectManager::shortcut_input(const Ref<InputEvent> &p_ev) {
12481248 keycode_handled = false ;
12491249 }
12501250 } break ;
1251+ case Key::A: {
1252+ if (k->is_command_or_control_pressed ()) {
1253+ if (k->is_shift_pressed ()) {
1254+ project_list->deselect_all_visible_projects ();
1255+ } else {
1256+ project_list->select_all_visible_projects ();
1257+ }
1258+ _update_project_buttons ();
1259+ }
1260+ } break ;
12511261 default : {
12521262 keycode_handled = false ;
12531263 } break ;
You can’t perform that action at this time.
0 commit comments