-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Added option to lock/unlock all other layers #1883
Conversation
… selected one. Works similar to show/hide all layers function
} | ||
|
||
undoStack->endMacro(); | ||
} |
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.
Insert a new line at the end.
@@ -125,6 +125,11 @@ MapDocumentActionHandler::MapDocumentActionHandler(QObject *parent) | |||
mActionToggleOtherLayers->setIcon( | |||
QIcon(QLatin1String(":/images/16x16/show_hide_others.png"))); | |||
|
|||
mActionToggleLockOtherLayers = new QAction(this); | |||
mActionToggleLockOtherLayers->setShortcut(tr("Ctrl+Shift+U")); |
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 guess Ctrl+Shift+U
was chosen because Ctrl+Shift+L
is already taken by "Save All"? I wonder if it wouldn't be more intuitive to use Ctrl+Shift+L
here and maybe drop the "Save All" shortcut again (or switch that one to Ctrl+Alt+S
, which is what Notepad++ uses).
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.
Yes I had put the shortcut to Ctrl+Shift+L first. I agree with your suggestion.
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.
Sorry, we can have only one Ctrl+Shift+S
shortcut, and now it means both "Save As" and "Save All" (in which case neither will trigger). Please change "Save As" to Ctrl+Alt+S
.
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.
Hi Bjorn, I can not see that Save As has the Ctrl+Shift+S
shortcut. Have I overlooked it somewhere?
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.
Yes, it happens in this line, because Ctrl+Shift+S
is a common shortcut for "Save As":
mUi->actionSaveAs->setShortcuts(QKeySequence::SaveAs);
Changed shortcut for "Toggle Lock other Layers" to Ctrl+Shift+L
I chose to fix the code instead of the documentation, since I think this is the behavior that is generally expected. If any not-locked layers are found, all layers should get locked, since that is the primary action. Unlocking happens only when all other layers are currently locked.
Thanks for this useful addition! |
Added option to lock/unlock all other layers except for the currently selected one. Works similar to show/hide all layers function.