Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1243 closed enhancement (fixed)

Start rename on new node added through the menu

Reported by: ornus Owned by: ilia
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: tree Cc:
Blocked By: Blocking:

Description

Add support to start rename for a new node added through the menu (or any other means, such as toolbar). In other words when a node is added through user interaction (and not as part of data processing) start rename.

I guess what I'm really asking for is to allow application to tell tree if the node is being created due to user interaction or something else. Later, independent part of the application might choose to start rename operation on a new node.

This should be configurable.

Also, maybe it would be more appropriate to start rename from the menu code, when reference to a new node is returned from the controller?

Change History (3)

comment:1 Changed 13 years ago by ornus

I managed to get desired effect by using this code

var newNode = this.treeController.createChild( menuItem.getTreeNode(), 0, { title:"New node" });
this.treeController.editLabelStart( newNode );
this.treeController.editor.richText.execCommand( "selectall" );

Not sure if this should be a part of the tree code or not.

comment:2 Changed 13 years ago by ilia

Resolution: fixed
Status: newclosed

I added createAndEdit command to controller for it

comment:3 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.