File tree 3 files changed +5
-10
lines changed
3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 37
37
#include " editor/themes/editor_scale.h"
38
38
#include " scene/theme/theme_db.h"
39
39
40
- bool EditorSpinSlider::is_text_field () const {
41
- return true ;
42
- }
43
-
44
40
String EditorSpinSlider::get_tooltip (const Point2 &p_pos) const {
45
41
if (!read_only && grabber->is_visible ()) {
46
42
Key key = (OS::get_singleton ()->has_feature (" macos" ) || OS::get_singleton ()->has_feature (" web_macos" ) || OS::get_singleton ()->has_feature (" web_ios" )) ? Key::META : Key::CTRL;
Original file line number Diff line number Diff line change @@ -101,8 +101,6 @@ class EditorSpinSlider : public Range {
101
101
void _focus_entered ();
102
102
103
103
public:
104
- virtual bool is_text_field () const override ;
105
-
106
104
String get_tooltip (const Point2 &p_pos) const override ;
107
105
108
106
String get_text_value () const ;
Original file line number Diff line number Diff line change @@ -156,11 +156,12 @@ void SceneTreeDock::shortcut_input(const Ref<InputEvent> &p_event) {
156
156
}
157
157
158
158
if (ED_IS_SHORTCUT (" scene_tree/rename" , p_event)) {
159
- // Prevent renaming if a button is focused
160
- // to avoid conflict with Enter shortcut on macOS
161
- if (! focus_owner || ! Object::cast_to<BaseButton >(focus_owner)) {
162
- _tool_selected (TOOL_RENAME) ;
159
+ // Prevent renaming if a button or a range is focused
160
+ // to avoid conflict with Enter shortcut on macOS.
161
+ if (focus_owner && (Object::cast_to<BaseButton>(focus_owner) || Object::cast_to<Range >(focus_owner) )) {
162
+ return ;
163
163
}
164
+ _tool_selected (TOOL_RENAME);
164
165
#ifdef MODULE_REGEX_ENABLED
165
166
} else if (ED_IS_SHORTCUT (" scene_tree/batch_rename" , p_event)) {
166
167
_tool_selected (TOOL_BATCH_RENAME);
You can’t perform that action at this time.
0 commit comments