Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
implementation of the copy canvas tool#10446
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
f092377
18df922
86d2968
9923703
25aceea
cff56e5
2f131e1
584bf3e
e87cb47
3866f29
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1069,11 +1069,18 @@ def trigger(self, *args): | ||
QtWidgets.QMessageBox.information(None, "Help", self._get_help_html()) | ||
class ToolCopyToClipboardQT(backend_tools.ToolCopyToClipboardBase): | ||
def trigger(self, *args, **kwargs): | ||
pixmap = self.canvas.grab() | ||
qApp.clipboard().setPixmap(pixmap) | ||
backend_tools.ToolSaveFigure = SaveFigureQt | ||
backend_tools.ToolConfigureSubplots = ConfigureSubplotsQt | ||
backend_tools.ToolSetCursor = SetCursorQt | ||
backend_tools.ToolRubberband = RubberbandQt | ||
backend_tools.ToolHelp = HelpQt | ||
backend_tools.ToolCopyToClipboard = ToolCopyToClipboardQT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. All the backend-specific tool classes do not have the "Tool" prefix. While, in general I would recommend to keep the prefix also in the backend specific classes, in the present situation I'm +0.3 not using it for consistency with the existing code. But I'm not familiar with that part of the code and don't know if there are any explicit policies on this. Maybe someone more experienced with that code can comment on this? Same holds for the other backends. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. @timhoffm you are right, we have to make the naming more consistent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Do we consider the backend implementations private? If so we can clean up the naming soon and this PR goes in as is. If not, we need a deprecation cycle. In that case, I‘d prefer to remove the Tool prefix in this PR as well and change everything later together. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. As the initial warning states. Tool names might change. So I don't see a problem doing all of them in a single PR | ||
def error_msg_qt(msg, parent=None): | ||