Skip to content

Conversation

akx
Copy link
Contributor

@akx akx commented Aug 13, 2024

Like it says on the tin – if Shift is pressed, skip the confirmation popup for deleting polys.

@akx
Copy link
Contributor Author

akx commented Sep 1, 2025

@wkentaro Rebased.

@akx akx force-pushed the deletor branch 2 times, most recently from 66a787c to 9c47d6c Compare September 19, 2025 10:11
@akx

This comment was marked as outdated.

if QtWidgets.QApplication.keyboardModifiers() == (
Qt.ControlModifier | Qt.ShiftModifier
):
if shift_and_ctrl_pressed():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - just using the same new function for the same functionality.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean, this pr is for deleting poly right? why you change keep_prev?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a bit of a side effect – I think, back last year when I originally made this PR, I figured it'd be worth it to unify the modifier key functionality used both for "hold shift to delete polys" and "hold shift+ctrl" as used here, into canonical helper functions.

"{} {}".format(
self.tr("Delete the selected polygons"),
self.tr("(Hold Shift to skip confirmation)"),
),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why separate translation texts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I didn't want to invalidate existing translations.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know, but is that the right thing to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you. I'm fine doing it either this way or by changing the entire translation.

@akx akx force-pushed the deletor branch 2 times, most recently from f0fde03 to 98ca192 Compare September 22, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants