Bug SS-200
1 vote

[DEV] Paste bug

Created by Davide on 8/8/2014 4:28 PM Last Updated by smath on 8/14/2014 1:19 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

SMath triggers the public override bool Paste(IClipboardManager clipboard) of any available plugin, even if there aren't regions on the canvas (but this should happens only if a region exists and is focused)

here the first notice

    smath (Thursday, August 14, 2014 1:19 PM) #

So, no action required.

    Davide (Friday, August 8, 2014 10:31 PM) #

Oh..., I've misinterpreted the SupportedClipboardFormats feature. Ok, if I use return new string[0]; all goes fine.

I guess that some finest solution should be introduced (maybe a plugin uses the same format of another but accept just some "patterns", f.e. a plugin may accept just unicode text with links, another just multiline texts, so if the first plugin doesn't match the requirements, the second could try to do the job - using a variable passed by reference or an override of the function or something else - but this is just a suggestion)

 

Thank you Andrey :)

    smath (Friday, August 8, 2014 8:40 PM) #

This is by design.

First of all SMath Studio checks if plug-in supports current clipboard format (using IPluginCustomRegion.SupportedClipboardFormats property). Then, if format is supported by the plug-in application will use plug-in to handle current operation with clipboard.

Unfortunately this means that if several plug-ins support the same type of data from clipboard then the first found plug-in will be used.