File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1171,8 +1171,32 @@ void LayoutScene::dropEvent(QGraphicsSceneDragDropEvent* event)
11711171
11721172void LayoutScene::keyPressEvent (QKeyEvent* event)
11731173{
1174+ // UX: select only siblings of already selected, if any?
1175+ if (event->matches (QKeySequence::SelectAll))
1176+ {
1177+ batchSelection (true );
1178+ clearSelection ();
1179+ for (auto item : items ())
1180+ if (dynamic_cast <LayoutManipulator*>(item))
1181+ item->setSelected (true );
1182+ batchSelection (false );
1183+ emit selectionChanged ();
1184+ event->accept ();
1185+ return ;
1186+ }
1187+
11741188 switch (event->key ())
11751189 {
1190+ case Qt::Key_Escape:
1191+ {
1192+ if (!selectedItems ().isEmpty ())
1193+ {
1194+ clearSelection ();
1195+ event->accept ();
1196+ return ;
1197+ }
1198+ break ;
1199+ }
11761200 case Qt::Key_Left:
11771201 case Qt::Key_Right:
11781202 case Qt::Key_Up:
You can’t perform that action at this time.
0 commit comments