LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Keep dropped snippet code selected

Status: New

When dragging a snippet onto the block diagram, its code should remain selected so we can immediately drag (or use the arrow keys to move) it to a better location.

 

Currently, the new code is not selected and it is nearly impossible to separate it from the existing code, for example if a complicated snippet is dropped on an already complicated block diagram.

 

(Not everybody has a gigantic screen to resize the existing BD for plenty of whitespace. I also often only have a small strip of the BD showing, with the explorer window containing the "droppee" on top. Dragging the snippet to the BD invariable ends in a complete mess.)

 

 

9 Comments
altenbach
Knight of NI

In addition, the dropped code should of course be selected AND floating. Often I need to place a snipped into a relatively small case (or other) structure and, unless I am able to align the snippet nicely over the empty space, the structure invariably expands in an unwanted fashion.

AristosQueue (NI)
NI Employee (retired)

> AND floating.

 

Oh, sure... we do that for snippets and then you'll be asking that we do that for Insert Image From Clipboard! And then you'll want it for Copy/Paste in general! I And merge VIs! I'm onto your Trojan Horse, Altenbach -- you get R&D to say "good idea" on this one little thing, and then trick us into having to say yes to all your good ideas!

 

By the way... good idea. 🙂

 

 

Darren
Proven Zealot

I don't like the floating idea.  Most of the time I'm dragging a snippet, it's into a blank top-level diagram.  Making it floating would require yet another click-drag after the first one.

AristosQueue (NI)
NI Employee (retired)

> Most of the time I'm dragging a snippet, it's into a blank top-level diagram.

 

Ok, so make it floating only if it overlaps anything already on the diagram. If the mouse click to place it happens to be inside a structure node, ignore that and just make it floating instead.

altenbach
Knight of NI

(1) Ideally, the snippet could just turn directly into the snippet code outline (instead of the "drop glyph") as soon as we are dragging it over the BD while at the same time the BD pops to the foreground.

 

It would look the same as when we select a code section and drag it somewhere else. I have no idea what that would involve or if it is even possible.

 

Darren: > I don't like the floating idea.  Most of the time I'm dragging a snippet, it's into a blank top-level diagram.  Making it floating would require yet another click-drag after the first one

 

(2) I think it typically would just require a click on the background to unselect. Not such a big deal.

 

(3) Another possibility would be to retain the current behavior, but place an intermediary step into the undo buffer. In this case, we drag the snippet and if we don't like where it lands, we press ctrl+z and it would turn into a floating selected object while also undoing the resizing of the structure that just happenend.

 

These are just some variations of the idea....

AristosQueue (NI)
NI Employee (retired)

> but place an intermediary step into the undo buffer.

 

Not a bad modification. MS Word does something similar for its autoreplace edits, and that works well for me.

Darren
Proven Zealot

I like the extra undo step...let's go with that.

GregSands
Active Participant

I prefer both ideas suggested in the comments to the original:

  1. pop the destination to the front when dragging into it (but only after the mouse has stopped moving, or every window in between will come to the front)
  2. use the undo buffer

 

Ray.R
Knight of NI

I'm with Greg:

 

prefer both ideas suggested in the comments to the original:

  1. pop the destination to the front when dragging into it (but only after the mouse has stopped moving, or every window in between will come to the front)
  2. use the undo buffer