Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support removing absent tools from ToolContainerBase.#28171

Merged
QuLogic merged 1 commit intomatplotlib:mainfrom
anntzer:rt
May 6, 2024
Merged

Support removing absent tools from ToolContainerBase.#28171
QuLogic merged 1 commit intomatplotlib:mainfrom
anntzer:rt

Conversation

@anntzer
Copy link
Contributor

ToolManager.remove_tool calls ToolContainerBase.remove_toolitem (via a tool_removed_event) and cannot know (due to the lack of API) whether the tool is actually on the container (it can also be a keybind-only tool not associated with any entry on the toolbar), so ToolContainerBase.remove_toolitem should work (as a no-op) even for tools not present on the container (and not even set a message in that case, IMO).

Closes#28166 (see example there). Again I'd say this is a symptom of the MEP22 design (toolmanager not knowing whether a tool is actually in the toolcontainer makes things awkward), but let's just go for the minimal fix.

PR summary

PR checklist

ToolManager.remove_tool calls ToolContainerBase.remove_toolitem(via a tool_removed_event) and cannot know (due to the lack of API)whether the tool is actually on the container (it can also be akeybind-only tool not associated with any entry on the toolbar), soToolContainerBase.remove_toolitem should work (as a no-op) even fortools not present on the container.
@QuLogicQuLogic added this to thev3.9.0 milestoneMay 6, 2024
@QuLogicQuLogic merged commit67aee6c intomatplotlib:mainMay 6, 2024
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMay 6, 2024
@anntzeranntzer deleted the rt branchMay 6, 2024 17:42
QuLogic added a commit that referenced this pull requestMay 7, 2024
…171-on-v3.9.xBackport PR#28171 on branch v3.9.x (Support removing absent tools from ToolContainerBase.)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

v3.9.0

Development

Successfully merging this pull request may close these issues.

[Bug]: Removing tools from the toolmanager that are not on the toolbar triggers an exception

3 participants

@anntzer@QuLogic@timhoffm

[8]ページ先頭

©2009-2026 Movatter.jp