Skip to content
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

Double click on scene tree element to focus currently selected node #5956

Merged
merged 1 commit into from
Aug 29, 2016

Conversation

djrm
Copy link
Contributor

@djrm djrm commented Jul 29, 2016

In 3D it will focus in the first viewport
Enable double click for trees
closes #5788

@vnen
Copy link
Member

vnen commented Jul 29, 2016

Also closes #5791.

@@ -527,6 +530,9 @@ friend class TreeItem;

void set_value_evaluator(ValueEvaluator *p_evaluator);

void set_delayed_text_editor_enabled(bool enabled);
bool get_delayed_text_editor_enabled() const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the rest of the API, I think those names would be better: set_delayed_text_editor(bool enabled) and is_delayed_text_editor_enabled() (or directly is_delayed_text_editor if it's clear enough).
See e.g. http://docs.godotengine.org/en/latest/classes/class_httpclient.html?highlight=enabled#class-httpclient-is-blocking-mode-enabled or http://docs.godotengine.org/en/latest/classes/class_graphedit.html?highlight=enabled#class-graphedit-is-right-disconnects-enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well those are shorter and basically used only in the engine so will change to the proposed ones

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think there is another option in tree, where you can choose if you want
doubleclick to edit, maybe we should make an enum with options like

EDITOR_ON_CLICK
EDITOR_ON_CLICK_SELECTED
EDITOR_ON_CLICK_SELECTED_DELAYED

On Fri, Jul 29, 2016 at 4:35 PM, Daniel Ramirez [email protected]
wrote:

In scene/gui/tree.h
#5956 (comment):

@@ -527,6 +530,9 @@ friend class TreeItem;

void set_value_evaluator(ValueEvaluator *p_evaluator);
  • void set_delayed_text_editor_enabled(bool enabled);
  • bool get_delayed_text_editor_enabled() const;

well those are shorter and basically used only in the engine so will
change to the proposed ones


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/5956/files/cf568acd52f15e2a90f3b7ec89013499cd73f3f1#r72848784,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z26Z-_IdFM3amyXfIDYZvb2gKEF_cks5qalYZgaJpZM4JXx3i
.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like
Tree::set_trigger_edit_mode()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djrm Do you still want to change those, or should we merge as is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akien-mga mm yeah i changed the functions according to your suggestions but i didn't understand what reduz said, so i will push my changes

@akien-mga akien-mga added this to the 2.1 milestone Jul 29, 2016
@akien-mga
Copy link
Member

Code looks good, I'll let @djrm reply to my above suggestion but otherwise it can be merged IMO.

@akien-mga akien-mga modified the milestones: 2.1, 2.2 Aug 10, 2016
In 3D it will focus in the first viewport
Enable double click for trees
@akien-mga akien-mga merged commit 23cb5ef into godotengine:master Aug 29, 2016
@djrm djrm deleted the tree_behavior branch August 29, 2016 18:04
@akien-mga akien-mga modified the milestones: 2.2, 3.0 Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard shortcut [F] (Center Selection) does not work.
4 participants