-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Allow holding shift to delete polys without confirmation #1481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@wkentaro Rebased. |
66a787c
to
9c47d6c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
if QtWidgets.QApplication.keyboardModifiers() == ( | ||
Qt.ControlModifier | Qt.ShiftModifier | ||
): | ||
if shift_and_ctrl_pressed(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary change?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)"), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why separate translation texts?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
f0fde03
to
98ca192
Compare
Like it says on the tin – if Shift is pressed, skip the confirmation popup for deleting polys.