Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic CopySelection/PasteSelection feature request. (Read 2139 times)
Mas-Tool
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Feb 5th, 2010
CopySelection/PasteSelection feature request.
Feb 5th, 2010 at 12:12pm
Print Post  
Hello,
I testing your diagramming library for a few weeks and I have to say that it's almost perfect !!

I'm trying to make a custom Copy/Paste commands using CopySelection and PasteSelection but it isn't working as expected.
The problem I'm having is that if I copy a few nodes and paste them a few times (using PasteSelection) what i get is the same instance of nodes from the FIRST paste and not a clone.

I think that a SelectionCopy.Clone is missing, so after each paste command I will clone my SelectionCopy.

I would really appreciate your help.
Miky.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CopySelection/PasteSelection feature request.
Reply #1 - Feb 5th, 2010 at 12:26pm
Print Post  
Hi,

Quote:
I testing your diagramming library for a few weeks and I have to say that it's almost perfect !!

Thanks 8)

Quote:
I'm trying to make a custom Copy/Paste commands using CopySelection and PasteSelection but it isn't working as expected.
The problem I'm having is that if I copy a few nodes and paste them a few times (using PasteSelection) what i get is the same instance of nodes from the FIRST paste and not a clone.

CopySelection and PasteSelection are mostly helper methods for the respective CopyToClipboard/PasteFromClipboard methods. Is there any reason why you can't use the clipboard methods? In any case, the items are actually cloned by the CopySelection method, and PasteSelection only places the clones. So if you need to use these methods, you will have to call CopySelection each time before PasteSelection.

Stoyan
  
Back to top
 
IP Logged
 
Mas-Tool
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Feb 5th, 2010
Re: CopySelection/PasteSelection feature request.
Reply #2 - Feb 7th, 2010 at 10:29am
Print Post  
Hello Stoyo,
Many thanks for your answer, I wasn't expecting to have a reply so fast !

I took your advice and changed my custom copy/paste to use CopyToClipboard/PasteFromClipboard.

But now when i call the PasteFromClipboard a loop of NodePasted event begins, but i do not know when it ends.
I need to call my LayoutArrange method right after the last node pasted, and not before because i'm using a custom workflow layout arrange.

So i got to ask, is there a way to be notified when the NodePasted loop ends ?

Thanks in advance,
Miky
  
Back to top
 
IP Logged
 
Mas-Tool
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Feb 5th, 2010
Re: CopySelection/PasteSelection feature request.
Reply #3 - Feb 7th, 2010 at 10:51am
Print Post  
Hello again,
It was my mistake !
PasteFromClipboard blocks until all NodePasted events raised !

Thanks for you help !
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint