Copy/Paste in User Models #1998

Closed
agrignard opened this Issue Sep 20, 2016 · 3 comments

Projects

None yet

2 participants

@agrignard
Contributor

When sharing a model I personally would like to copy the folder from anywhere and simply paste it in user models folder

Instead I need to create a fake GamaProject and then paste my folder

I don't know why (I am sure there is a good reason) there is no way to paste

Is it possible to make a paste feature on this icon?

@AlexisDrogoul
Member

Complicated. Because what you call a "folder" needs to be a "project" to be pasted like this. And I havent found a proper way to determine it when pasting. Doesn't the import function work ?

@AlexisDrogoul
Member

I'm a nice guy, so I have implemented a working workaround. So, basically:

  • You can now copy files / folders in the OS and paste them (using the "Paste in User Models" item in the menu) directly in "User Models". If your selection is a file or a folder without GAMA informations (i.e. not a project), then you are asked for a project into which copying it or, if you dont choose, it will create an "Unclassified Models" project for you and paste your selection in it. If it is a GAMA project, then the project is directly imported (unless, of course, it already exists, in which case you have the possibility to merge their contents -- file by file or as a whole).
  • You can also do the same operation by DRAG'N DROP, either by dropping your files/folders in the navigator view or on the "User Models" icon.

Both operations will copy the files by default. If you want, instead, to link to a folder on your file system, then the various import functions should be preferred.

Both processes are working well, but they are not yet a complete solution, since, for some mysterious reason, I can't have the "CTRL+V" shortcut working on "User Models" and can't make the "Paste in User Models" item appear when right-clicking directly in the empty space of the navigator. I leave it for another issue...

@AlexisDrogoul AlexisDrogoul added a commit that closed this issue Sep 22, 2016
@AlexisDrogoul AlexisDrogoul Fixes #1998.
Signed-off-by: AlexisDrogoul <alexis.drogoul@gmail.com>
c48bc53
@AlexisDrogoul AlexisDrogoul added a commit that referenced this issue Sep 22, 2016
@AlexisDrogoul AlexisDrogoul Finally managed to implement CTRL+V on Navigator (cf. #1998)
Fixes a bug in the selection of containers
Signed-off-by: AlexisDrogoul <alexis.drogoul@gmail.com>
82d636f
@agrignard
Contributor

Great!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment