Skip to content
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

remove noexit=yes and fixme=continue when you continue a line #9634

Merged
merged 2 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :sparkles: Usability & Accessibility
* Fix flickering when switching between background imagery layers, make switching backgrounds snappier
* Prevent password managers from autofilling tag fields ([#10508], thanks [@michaelabon])
* remove `noexit=yes` and `fixme=continue` when you continue a line ([#9634], thanks [@k-yle])
#### :scissors: Operations
* When extracting a node from a way (shortcut: <kbd>E</kbd>), the relations are now preserved by default. Extracting a node without its relations is still possible using <kbd>⇧ Shift</kbd> <kbd>E</kbd> ([#9816], thanks [@k-yle])
* Remove rarely-used keyboard shortcut <kbd>L</kbd> to prevent accidental activation of the geolocate tool ([#9999], thanks [@k-yle])
Expand Down Expand Up @@ -68,6 +69,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
* Migrate unit tests from karma to vitest ([#10452])

[#9013]: https://github.com/openstreetmap/iD/issues/9013
[#9634]: https://github.com/openstreetmap/iD/pull/9634
[#9816]: https://github.com/openstreetmap/iD/issues/9816
[#9999]: https://github.com/openstreetmap/iD/issues/9999
[#10452]: https://github.com/openstreetmap/iD/pull/10452
Expand Down
18 changes: 18 additions & 0 deletions modules/operations/continue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { t } from '../core/localizer';
import { modeDrawLine } from '../modes/draw_line';
import { behaviorOperation } from '../behavior/operation';
import { utilArrayGroupBy } from '../util';
import { actionChangeTags } from '../actions';


export function operationContinue(context, selectedIDs) {
Expand All @@ -28,6 +29,23 @@ export function operationContinue(context, selectedIDs) {

var operation = function() {
var candidate = _candidates[0];

// remove fixme=continue or noexit=yes from the vertex.
const tagsToRemove = new Set();
if (_vertex.tags.fixme === 'continue') tagsToRemove.add('fixme');
if (_vertex.tags.noexit === 'yes') tagsToRemove.add('noexit');

if (tagsToRemove.size) {
context.perform((graph) => {
const newTags = { ..._vertex.tags };
for (const key of tagsToRemove) {
delete newTags[key];
}

return actionChangeTags(_vertex.id, newTags)(graph);
}, operation.annotation());
}

context.enter(
modeDrawLine(context, candidate.id, context.graph(), 'line', candidate.affix(_vertex.id), true)
);
Expand Down
Loading