intel / rib

Rapid Interface Builder (RIB) is a browser-based design tool for quickly prototyping and creating the user interface for web applications. Layout your UI by dropping widgets onto a canvas. Run the UI in an interactive "Preview mode". Export the generated HTML and Javascript. It's that simple!
https://01.org/rib
Apache License 2.0
148 stars 74 forks source link

[Tree View] Fix bug: When moving a selected node, outline view loses sel... #257

Closed zhizhangchen closed 12 years ago

zhizhangchen commented 12 years ago

...ection

grgustaf commented 12 years ago

The weird thing now is that when you drag a new widget in from the palette, the old one remains highlighted at the same time as the new one, and then the old one gets unhighlighted.

grgustaf commented 12 years ago

The best solution for this could be a little tricky. I expect the outline view sees a "node insertion" event followed by a "node selected" event. Perhaps we should included the updated selection as part of the node insertion event?

Or we could just check for the current selection as we handle the node insertion event in the outline view, it's probably already been set, we just haven't seen the selectionChanged event yet.

zhizhangchen commented 12 years ago

Yes, it's a little tricky. I updated the PR to set selected node while creating tree node to make sure only one node is selected and it also makes it unnecessary to scroll when moving node.

grgustaf commented 12 years ago

Merged.