file Disable Drag and drop between elements

5 years 6 months ago #2858 by Nico42
Hello,

I'm using Modelio 2.2 with the Java API.

By default, an element can be dragged and dropped on another element, and one becomes the Owner of the other.

I would like to disable that, but how ?

Please Log in or Create an account to join the conversation.

5 years 6 months ago - 5 years 6 months ago #2859 by ebr
Hi Nico,

The best way to do would imply to rebuild a new Modelio in order to forbidden this kind of behavior.

A workaround would be to create a module which listen the model change and undo/cancel all element movement i.e. drag and drop but also copy/paste, scripts, etc. cf here .

Hoping it helps,

EBR

Please Log in or Create an account to join the conversation.

5 years 6 months ago #2860 by Nico42
For sure it helps thx.

So now I have somewhere to know and to process when such changes on the model happens.

I would prefer to cancel the last Transaction with session.rollback(..)
rather than trying to simulate ctrl+z, but i need to know how to get this last Transaction. Or maybe there is a simple way ?

Please Log in or Create an account to join the conversation.

5 years 6 months ago #2868 by ebr
If you are not the one which submitted (and you did not save it somewhere) the given transaction, you can not have access to it.

The only acess is the procided model change listener...

Regards,

EBR

Please Log in or Create an account to join the conversation.

5 years 6 months ago #2884 by Nico42
Ok thx for your answer, i'll deal with it for now.

Maybe i will look into the source code to identify which action is executed after a ctrl+z

Thx ebr, like always.

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.035 seconds
^ Back to Top