mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Make editor property clipboard static
This commit is contained in:
parent
2b832e9974
commit
0c52406758
3 changed files with 9 additions and 10 deletions
|
|
@ -1337,10 +1337,10 @@ Control *EditorProperty::make_custom_tooltip(const String &p_text) const {
|
|||
void EditorProperty::menu_option(int p_option) {
|
||||
switch (p_option) {
|
||||
case MENU_COPY_VALUE: {
|
||||
InspectorDock::get_inspector_singleton()->set_property_clipboard(object->get(property));
|
||||
EditorInspector::set_property_clipboard(object->get(property));
|
||||
} break;
|
||||
case MENU_PASTE_VALUE: {
|
||||
emit_changed(property, InspectorDock::get_inspector_singleton()->get_property_clipboard());
|
||||
emit_changed(property, EditorInspector::get_property_clipboard());
|
||||
} break;
|
||||
case MENU_COPY_PROPERTY_PATH: {
|
||||
DisplayServer::get_singleton()->clipboard_set(property_path);
|
||||
|
|
@ -5614,7 +5614,7 @@ void EditorInspector::set_property_clipboard(const Variant &p_value) {
|
|||
property_clipboard = p_value;
|
||||
}
|
||||
|
||||
Variant EditorInspector::get_property_clipboard() const {
|
||||
Variant EditorInspector::get_property_clipboard() {
|
||||
return property_clipboard;
|
||||
}
|
||||
|
||||
|
|
@ -5726,7 +5726,6 @@ EditorInspector::EditorInspector() {
|
|||
set_process(false);
|
||||
set_focus_mode(FocusMode::FOCUS_ALL);
|
||||
property_focusable = -1;
|
||||
property_clipboard = Variant();
|
||||
|
||||
get_v_scroll_bar()->connect(SceneStringName(value_changed), callable_mp(this, &EditorInspector::_vscroll_changed));
|
||||
update_scroll_request = -1;
|
||||
|
|
|
|||
|
|
@ -38,14 +38,12 @@
|
|||
|
||||
class AddMetadataDialog;
|
||||
class AcceptDialog;
|
||||
class ConfirmationDialog;
|
||||
class EditorInspector;
|
||||
class EditorValidationPanel;
|
||||
class HSeparator;
|
||||
class LineEdit;
|
||||
class MarginContainer;
|
||||
class OptionButton;
|
||||
class PanelContainer;
|
||||
class PopupMenu;
|
||||
class SpinBox;
|
||||
class StyleBoxFlat;
|
||||
|
|
@ -715,7 +713,8 @@ class EditorInspector : public ScrollContainer {
|
|||
|
||||
String property_prefix; // Used for sectioned inspector.
|
||||
String object_class;
|
||||
Variant property_clipboard;
|
||||
|
||||
static inline Variant property_clipboard;
|
||||
|
||||
bool restrict_to_basic = false;
|
||||
|
||||
|
|
@ -783,6 +782,9 @@ public:
|
|||
static void initialize_section_theme(EditorInspectorSection::ThemeCache &p_cache, Control *p_control);
|
||||
static void initialize_category_theme(EditorInspectorCategory::ThemeCache &p_cache, Control *p_control);
|
||||
|
||||
static void set_property_clipboard(const Variant &p_value);
|
||||
static Variant get_property_clipboard();
|
||||
|
||||
bool is_main_editor_inspector() const;
|
||||
String get_selected_path() const;
|
||||
|
||||
|
|
@ -839,8 +841,6 @@ public:
|
|||
void set_use_deletable_properties(bool p_enabled);
|
||||
|
||||
void set_restrict_to_basic_settings(bool p_restrict);
|
||||
void set_property_clipboard(const Variant &p_value);
|
||||
Variant get_property_clipboard() const;
|
||||
|
||||
EditorInspector();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
class CheckBox;
|
||||
class ColorPickerButton;
|
||||
class ConfirmationDialog;
|
||||
class CreateDialog;
|
||||
class EditorFileDialog;
|
||||
class EditorLocaleDialog;
|
||||
|
|
@ -41,7 +42,6 @@ class EditorResourcePicker;
|
|||
class EditorSpinSlider;
|
||||
class EditorVariantTypePopupMenu;
|
||||
class MenuButton;
|
||||
class PropertySelector;
|
||||
class SceneTreeDialog;
|
||||
class TextEdit;
|
||||
class TextureButton;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue