[TD]Fix no delete of cosmetic in clip group (#22838)

* [TD]Fix no delete of cosmetic in clip group

* [TD]lint clean up
This commit is contained in:
WandererFan
2025-08-24 21:55:55 -04:00
committed by GitHub
parent 6c9c5127a6
commit e256ff3c3d
8 changed files with 96 additions and 29 deletions

View File

@@ -130,13 +130,11 @@ QVariant QGIViewPart::itemChange(GraphicsItemChange change, const QVariant& valu
bool QGIViewPart::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
{
// Base::Console().message("QGIVP::sceneEventFilter - event: %d watchedtype: %d\n",
// event->type(), watched->type() - QGraphicsItem::UserType);
if (event->type() == QEvent::ShortcutOverride) {
// if we accept this event, we should get a regular keystroke event next
// which will be processed by QGVPage/QGVNavStyle keypress logic, but not forwarded to
// Std_Delete
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
auto *keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->matches(QKeySequence::Delete)) {
bool success = removeSelectedCosmetic();
if (success) {