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

Merged
merged 5 commits into from Feb 20, 2018

Conversation

Projects
None yet
3 participants
@kralle333
Contributor

kralle333 commented Feb 16, 2018

Added option to lock/unlock all other layers except for the currently selected one. Works similar to show/hide all layers function.

Added option to lock/unlock all other layers except for the currently…
… selected one. Works similar to show/hide all layers function
}

undoStack->endMacro();
}

This comment has been minimized.

@ketanhwr

ketanhwr Feb 16, 2018

Contributor

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"));

This comment has been minimized.

@bjorn

bjorn Feb 19, 2018

Owner

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).

This comment has been minimized.

@kralle333

kralle333 Feb 19, 2018

Contributor

Yes I had put the shortcut to Ctrl+Shift+L first. I agree with your suggestion.

This comment has been minimized.

@bjorn

bjorn Feb 19, 2018

Owner

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.

This comment has been minimized.

@kralle333

kralle333 Feb 20, 2018

Contributor

Hi Bjorn, I can not see that Save As has the Ctrl+Shift+S shortcut. Have I overlooked it somewhere?

This comment has been minimized.

@bjorn

bjorn Feb 20, 2018

Owner

Yes, it happens in this line, because Ctrl+Shift+S is a common shortcut for "Save As":

mUi->actionSaveAs->setShortcuts(QKeySequence::SaveAs);

kralle333 and others added some commits Feb 19, 2018

Changed shortcut for "Save All" to Ctrl+Shift+S
Changed shortcut  for "Toggle Lock other Layers" to Ctrl+Shift+L
Fixed the toggleLockOtherLayers to behave as documented
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.

@bjorn bjorn merged commit 9794037 into bjorn:master Feb 20, 2018

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@bjorn

This comment has been minimized.

Owner

bjorn commented Feb 20, 2018

Thanks for this useful addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment