-
Notifications
You must be signed in to change notification settings - Fork 99
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
Deal with __getstate__ methods #633
Changes from 1 commit
078f382
3745495
b7f7210
72700bb
77c0e59
80a16b9
fae52fa
c7c93ab
f38cbcc
eeea965
6fc674f
ba66fc8
2152d9b
a984b40
6bfb912
c005b55
fd4b2c9
55893e0
f3395f0
14789fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,23 +38,13 @@ class SimpleZoom(AbstractOverlay, ToolHistoryMixin, BaseZoomTool): | |
#: Perform a "box" selection on two axes. | ||
tool_mode = Enum("box", "range") | ||
|
||
<<<<<<< HEAD | ||
# Is the tool always "on"? If True, left-clicking always initiates | ||
# a zoom operation; if False, the user must press a key to enter zoom mode. | ||
always_on = Bool(False, transient=True) | ||
|
||
# Defines a meta-key, that works with always_on to set the zoom mode. This | ||
# is useful when the zoom tool is used in conjunction with the pan tool. | ||
always_on_modifier = Enum(None, "shift", "control", "alt", transient=True) | ||
======= | ||
#: Is the tool always "on"? If True, left-clicking always initiates | ||
#: a zoom operation; if False, the user must press a key to enter zoom mode. | ||
always_on = Bool(False) | ||
|
||
#: Defines a meta-key, that works with always_on to set the zoom mode. This | ||
#: is useful when the zoom tool is used in conjunction with the pan tool. | ||
always_on_modifier = Enum(None, "shift", "control", "alt") | ||
>>>>>>> master | ||
|
||
# ------------------------------------------------------------------------- | ||
# Zoom control | ||
|
@@ -78,48 +68,27 @@ class SimpleZoom(AbstractOverlay, ToolHistoryMixin, BaseZoomTool): | |
#: Conversion ratio from wheel steps to zoom factors. | ||
wheel_zoom_step = Float(1.0) | ||
|
||
<<<<<<< HEAD | ||
# The key press to enter zoom mode, if **always_on** is False. Has no effect | ||
# if **always_on** is True. | ||
enter_zoom_key = Instance(KeySpec, args=("z",), transient=True) | ||
|
||
# The key press to leave zoom mode, if **always_on** is False. Has no effect | ||
# if **always_on** is True. | ||
exit_zoom_key = Instance(KeySpec, args=("z",), transient=True) | ||
======= | ||
#: The key press to enter zoom mode, if **always_on** is False. Has no effect | ||
#: if **always_on** is True. | ||
enter_zoom_key = Instance(KeySpec, args=("z",)) | ||
|
||
#: The key press to leave zoom mode, if **always_on** is False. Has no effect | ||
#: if **always_on** is True. | ||
exit_zoom_key = Instance(KeySpec, args=("z",)) | ||
>>>>>>> master | ||
|
||
#: Disable the tool after the zoom is completed? | ||
disable_on_complete = Bool(True) | ||
|
||
<<<<<<< HEAD | ||
# The minimum amount of screen space the user must select in order for | ||
# the tool to actually take effect. | ||
minimum_screen_delta = Int(10, transient=True) | ||
======= | ||
#: The minimum amount of screen space the user must select in order for | ||
#: the tool to actually take effect. | ||
minimum_screen_delta = Int(10) | ||
>>>>>>> master | ||
|
||
# ------------------------------------------------------------------------- | ||
# Appearance properties (for Box mode) | ||
# ------------------------------------------------------------------------- | ||
|
||
<<<<<<< HEAD | ||
# The pointer to use when drawing a zoom box. | ||
pointer = Str("magnifier", transient=True) | ||
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. This may be bad if I need to climb up the class hierarchy to see if it was previously defined as a trait. I remember Kit mentioning this being a point of confusion. I am not sure what the ideal way to avoid this confusion would be (aside from maybe a comment above saying if this is a class attribute or just setting a trait to a value. I guess if setting a trait to some value, you could do as I have done here? and explicitly do something like 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 a quick sanity check, on master I defined a class attribute
So, I believe the change made here is the right one |
||
======= | ||
#: The pointer to use when drawing a zoom box. | ||
pointer = "magnifier" | ||
>>>>>>> master | ||
|
||
#: The color of the selection box. | ||
color = ColorTrait("lightskyblue") | ||
|
@@ -138,13 +107,8 @@ class SimpleZoom(AbstractOverlay, ToolHistoryMixin, BaseZoomTool): | |
#: The thickness of selection rectangle border. | ||
border_size = Int(1) | ||
|
||
<<<<<<< HEAD | ||
# The possible event states of this zoom tool. | ||
event_state = Enum("normal", "selecting", transient=True) | ||
======= | ||
#: The possible event states of this zoom tool. | ||
event_state = Enum("normal", "selecting") | ||
>>>>>>> master | ||
|
||
# ------------------------------------------------------------------------ | ||
# Key mappings | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you lost the
#:
because of the merge conflicts.