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

ColorListWidget: Warn about spot color removal #2209

Closed

Conversation

lpechacek
Copy link
Member

@lpechacek lpechacek commented Mar 16, 2024

A color entry may serve as a spot color without direct use in symbols. So far Mapper allowed silent removal of these color entries. This patch adds a warning that triggers when the user tries to remove such a spot color.

The problem with disabling the Overprint simulation option while the map is still displayed in overprint mode (as seen in the video further down) is not addressed by this patch. The mechanism for disabling overprint upon the last color deletion seems to be in place but does not work.

EDIT: The second patch fixes the problem with disabling the Overprint simulation option presented at the end of the video.

A video documenting the current behavior:
spot-color-no-warning.webm

@dl3sdo
Copy link
Member

dl3sdo commented Apr 1, 2024

Libor, if you want, I would review your PR.
At first glance I stumbled across "Another map color uses....remove the spot color from these map colors!"

@lpechacek
Copy link
Member Author

Libor, if you want, I would review your PR. At first glance I stumbled across "Another map color uses....remove the spot color from these map colors!"

Yes, please! The text, and maybe the code, may benefit from editing. :)

@dl3sdo
Copy link
Member

dl3sdo commented Apr 5, 2024

Counting and reporting the number of affected colors could be a nice addition.
See 90e2650
On the other hand, this information might be unimportant for most users and thus not worth the effort (and it still lacks from using 'these' and the hope that the %n and (s) work as intended).

If you keep your originial proposal I would suggest to replace "Another map color uses this one as a spot color."
by "At least one other map color uses this color as a spot color."

lpechacek and others added 2 commits April 5, 2024 22:18
A color entry may serve as a spot color without direct use in symbols.
So far Mapper allowed silent removal of these color entries.  This patch
adds a warning that triggers when the user tries to remove such a spot
color.

Co-authored-by: Matthias Kuehlewein <github@kuehlewein.de>
It is possible to enable overprinting simulation and then delete all
spot colors. The result is no map display and disabled overprinting
simulation option in the menu. The user is locked out of the map content
until addition of a new spot color to enable the menu item.  This patch
makes Mapper react on the absence of spot colors by disabling the
overprinting effect.

Side remark: MapEditorController::newCheckAction connects the action's
triggered() signal to the target slot.  Qt documentation clearly states
that the signal is not emitted upon setChecked() call.  If
newCheckAction linked to the toggled() or changed() signals, the call
added by this patch might be superfluous.
@lpechacek lpechacek force-pushed the warn-on-spot-color-deletion branch from 0ed70f3 to f59471c Compare April 5, 2024 20:21
@lpechacek
Copy link
Member Author

Counting and reporting the number of affected colors could be a nice addition.

LGTM. Merged into LibreMapper and squashed into this series. Thanks!

@dg0yt dg0yt self-assigned this Apr 12, 2024
@dg0yt
Copy link
Member

dg0yt commented Apr 13, 2024

My suggestion is now in GH-2222.

@lpechacek
Copy link
Member Author

My suggestion is now in GH-2222.

Whatever solves the problem... Thanks for the enhancements!

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.

None yet

3 participants