diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-25 09:11:41 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-25 09:29:51 +0200 |
commit | 336846e547c1daeb8855b091d21df3b91c2a80a8 (patch) | |
tree | 4deeade72d8d600e64721adbe4a65baffb810f6d /editor | |
parent | eb300ba8fe48a76d31b97564eb34c58c355cdbd5 (diff) |
Inspector: Fix PROPERTY_HINT_SPRITE_FRAME not behaving as RANGE
This was a regression in 3.1 and later from the new inspector, where
PROPERTY_HINT_SPRITE_FRAME was not fully re-implemented. It's meant to
be a normal PROPERTY_HINT_RANGE which also automatically increments its
value when keyed in the animation player.
To avoid code duplication, I made the frames properties use the actual
PROPERTY_HINT_RANGE and introduced a PROPERTY_USAGE_KEYING_INCREMENTS
usage flag instead.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_inspector.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index e4ddf44bc4..70bbd0fd6c 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -504,7 +504,7 @@ bool EditorProperty::use_keying_next() const { PropertyInfo &p = I->get(); if (p.name == property) { - return p.hint == PROPERTY_HINT_SPRITE_FRAME; + return (p.usage & PROPERTY_USAGE_KEYING_INCREMENTS); } } |