Skip to content

Delete multiple features in bulk#4119

Merged
gabriel-bolbotina merged 25 commits into
masterfrom
feature/deleteMultipleFeature
Nov 21, 2025
Merged

Delete multiple features in bulk#4119
gabriel-bolbotina merged 25 commits into
masterfrom
feature/deleteMultipleFeature

Conversation

@kaustuvpokharel

@kaustuvpokharel kaustuvpokharel commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Case:

Multiselect feature exists, but there is no way to delete all selected multiple feature at once, so pr includes the deleteMultipleSelect feature

Fix:

  • Included feature deletion inside MultiEditManager class
    //! Deletes selected or toggled features upon called Q_INVOKABLE void deleteSelectedFeature();
  • Changed UI with delete button with respected UI
  • Added the drawer to verify the deletion before actually deleting it

Tests:

  • Added test cases only for checking deletion feature inside the new file testmultieditmanager
    Note: this file is incomplete in a sense that it is missing other feature test cases which already existed inside the MultiEditManager class, as I was only requested to add tests for my new feature addition. But it needs more test cases to test other prior existing functions/methods.

image

@github-actions

github-actions Bot commented Sep 25, 2025

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 18636599772

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1014 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.1%) to 19.756%

Files with Coverage Reduction New Missed Lines %
mm/app/attributes/attributecontroller.cpp 1 76.83%
mm/app/layerfeaturesmodel.cpp 1 79.5%
mm/core/merginapi.cpp 1 75.22%
mm/app/multieditmanager.h 2 0.0%
build-mm-db/app/Input_autogen/EWIEGA46WW/moc_multieditmanager.cpp 25 15.31%
mm/app/multieditmanager.cpp 42 50.4%
build-mm-db/app/.rcc/qmlcache/Input_qml/main_qml.cpp 942 0.0%
Totals Coverage Status
Change from base Build 18284755654: 0.1%
Covered Lines: 14047
Relevant Lines: 71104

💛 - Coveralls

@kaustuvpokharel kaustuvpokharel marked this pull request as ready for review September 29, 2025 12:24

@tomasMizera tomasMizera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tests + updates as discussed :)

Comment thread app/qml/main.qml
Comment thread app/multieditmanager.h Outdated
@kaustuvpokharel

Copy link
Copy Markdown
Contributor Author

image

@kaustuvpokharel

Copy link
Copy Markdown
Contributor Author
Screen.Recording.2025-10-01.at.8.09.53.PM.mov

@Withalion Withalion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I still believe we can do better than using (s) in the text, maybe propagate through the signal if it's single or multi edit and then use ternary operator inline.

Comment thread app/multieditmanager.cpp Outdated
Comment thread app/multieditmanager.cpp
Comment thread app/multieditmanager.cpp
@tomasMizera

Copy link
Copy Markdown
Collaborator

I still believe we can do better than using (s) in the text, maybe propagate through the signal if it's single or multi edit and then use ternary operator inline.

https://doc.qt.io/qt-6/i18n-source-translation.html#handle-plural-forms

@tomasMizera

Copy link
Copy Markdown
Collaborator

Hi @kaustuvpokharel - we can close the multiselect drawer after features are deleted.

@kaustuvpokharel

Copy link
Copy Markdown
Contributor Author

Noted

Withalion
Withalion previously approved these changes Oct 2, 2025
@Withalion Withalion dismissed their stale review October 2, 2025 23:26

Dialog is not closed after deletion is done

@Withalion Withalion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would also add test for editing some points not just deleting

Comment thread app/test/inputtests.cpp Outdated
Comment thread app/test/testmultieditmanager.cpp Outdated
Comment thread app/test/testmultieditmanager.h Outdated
Comment thread app/test/testmultieditmanager.h Outdated
Comment thread app/test/testmultieditmanager.cpp Outdated
Comment thread app/test/testmultieditmanager.cpp Outdated
Comment thread app/test/testmultieditmanager.cpp
Comment thread app/qml/main.qml Outdated
@tomasMizera

Copy link
Copy Markdown
Collaborator

Moving to 2025.8.0

@tomasMizera tomasMizera changed the base branch from dev/2025.7.0 to dev/2025.8.0 October 10, 2025 11:49

@Withalion Withalion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just few more things

Comment thread app/qml/main.qml Outdated
Comment thread app/test/testmultieditmanager.cpp

@Withalion Withalion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems alright now, let's see what @tomasMizera thinks.

@tomasMizera tomasMizera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a couple of minor comments :)

Comment thread app/multieditmanager.h Outdated
Comment thread app/multieditmanager.cpp Outdated
Comment thread app/qml/gps/MMSelectionDrawer.qml Outdated
Comment thread app/qml/main.qml Outdated
@tomasMizera tomasMizera changed the title Feature/delete multiple feature Delete multiple features in bulk Nov 7, 2025
@Withalion Withalion changed the base branch from dev/2025.8.0 to master November 11, 2025 10:01
@gabriel-bolbotina gabriel-bolbotina force-pushed the feature/deleteMultipleFeature branch from 12e5b14 to dd53c26 Compare November 19, 2025 10:40
@gabriel-bolbotina

gabriel-bolbotina commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

I have added a scrollbar for the button text which might be larger than in English.

Future-proof in case of adding multiple functionality buttons.

Some use case scenarios are presented in these videos

@tomasMizera tomasMizera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good 👍🏻

Comment thread app/qml/main.qml

property int countToDelete: 0

title: qsTr( "Delete feature(s)", "", countToDelete )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Have you checked if the plural form works properly even without %n? :)

@gabriel-bolbotina gabriel-bolbotina merged commit 48c5659 into master Nov 21, 2025
12 checks passed
@gabriel-bolbotina gabriel-bolbotina deleted the feature/deleteMultipleFeature branch November 21, 2025 07:38
@gabriel-bolbotina

Copy link
Copy Markdown
Contributor

For testing

For Android

For iOS

The build is number 25.11.826711

gabriel-bolbotina added a commit that referenced this pull request Nov 24, 2025
* added a button prototype, replecating editButton

* working deleteFeature for multiselect

* astyle code convention

* added confirmation dialog for deletion

* added missing safe bottom space for the drawer dialog

* delete button (MMButton -UI changed to follow figma color

* uncommented the commented lines for testing

* changed the function according to feeback, fixed dialog texts, added log info

* code convention failing

* Revert "code convention failing"

This reverts commit 75fb005.

* minor code-conv-style fix

* wrong push

* applied suggested changes

* new file could be targeted by cmake

* test file conntected and working with the project

* added test for multiEditManager class completely/focused for deleteMulipleSelected Feature and skipped some potential tests cases of the entire class(multieditmanager)

* MultiSelectDrawer closed after the deletion

* cleaned exiting code, and removed redundent dependencies

* pural suggestion implemented

* text suggestion applied

* added suggested changes

* Formatted code

* Added scrollbar

---------

Co-authored-by: Gabriel Bolbotina <bolbotinagabriel@gmail.com>
gabriel-bolbotina added a commit that referenced this pull request Nov 25, 2025
* added a button prototype, replecating editButton

* working deleteFeature for multiselect

* astyle code convention

* added confirmation dialog for deletion

* added missing safe bottom space for the drawer dialog

* delete button (MMButton -UI changed to follow figma color

* uncommented the commented lines for testing

* changed the function according to feeback, fixed dialog texts, added log info

* code convention failing

* Revert "code convention failing"

This reverts commit 75fb005.

* minor code-conv-style fix

* wrong push

* applied suggested changes

* new file could be targeted by cmake

* test file conntected and working with the project

* added test for multiEditManager class completely/focused for deleteMulipleSelected Feature and skipped some potential tests cases of the entire class(multieditmanager)

* MultiSelectDrawer closed after the deletion

* cleaned exiting code, and removed redundent dependencies

* pural suggestion implemented

* text suggestion applied

* added suggested changes

* Formatted code

* Added scrollbar

---------

Co-authored-by: Gabriel Bolbotina <bolbotinagabriel@gmail.com>
gabriel-bolbotina added a commit that referenced this pull request Dec 18, 2025
* added a button prototype, replecating editButton

* working deleteFeature for multiselect

* astyle code convention

* added confirmation dialog for deletion

* added missing safe bottom space for the drawer dialog

* delete button (MMButton -UI changed to follow figma color

* uncommented the commented lines for testing

* changed the function according to feeback, fixed dialog texts, added log info

* code convention failing

* Revert "code convention failing"

This reverts commit 75fb005.

* minor code-conv-style fix

* wrong push

* applied suggested changes

* new file could be targeted by cmake

* test file conntected and working with the project

* added test for multiEditManager class completely/focused for deleteMulipleSelected Feature and skipped some potential tests cases of the entire class(multieditmanager)

* MultiSelectDrawer closed after the deletion

* cleaned exiting code, and removed redundent dependencies

* pural suggestion implemented

* text suggestion applied

* added suggested changes

* Formatted code

* Added scrollbar

---------

Co-authored-by: Gabriel Bolbotina <bolbotinagabriel@gmail.com>
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.

Feature to delete multiple selected features at once

4 participants