MesserLab / SLiM

SLiM is a genetically explicit forward simulation software package for population genetics and evolutionary biology. It is highly flexible, with a built-in scripting language, and has a cross-platform graphical modeling environment called SLiMgui.
https://messerlab.org/slim/
GNU General Public License v3.0
160 stars 30 forks source link

SLiMgui should offer to load external script changes #423

Closed bhaller closed 6 months ago

bhaller commented 7 months ago

For those who use external editors, SLiMgui should offer to reload the script if it has changed on disk (and has not been changed locally, I suppose, since then edits clash). Should be easy to implement.

iago-lito commented 7 months ago

Agreed. Maybe it could even check periodically on its own to update, and only require user input if both the buffer version and the disk version have changed?

bhaller commented 7 months ago

By default I think a reload should always require user confirmation; but I can imagine providing a preference for that. I'll see what I can do. :->

bhaller commented 6 months ago

Hi @iago-lito. I've just pushed a fix for this. It runs a panel to ask if you want to reload. There is a pref in Preferences now that lets you ask for automatic reloading. If there is a conflict – if there are unsaved changes in SLiMgui at the same time that the file has changed on disk – then the confirmation panel will always be run, though. I think this is pretty good; please try it out and let me know if you see any problems. (You can build SLiMgui from the current GitHub head following the instructions in chapter 2 of the SLiM manual.) Thanks for the helpful suggestion!

By the way, normally I add people to the credits if they have contributed a useful feature suggestion or bug report. If you want to be added, let me know (here or in an email) what your real name is. :->

iago-lito commented 6 months ago

Hello, I have just tried it and it seems to work great :) Thank your for the addition. My name is Iago Bonnici if you really wish to flesh your credits list, although I think I would deserve it better if I were brave enough to take a shot at #424 ^ ^"

bhaller commented 6 months ago

Hello, I have just tried it and it seems to work great :) Thank your for the addition. My name is Iago Bonnici if you really wish to flesh your credits list, although I think I would deserve it better if I were brave enough to take a shot at #424 ^ ^"

Hey, you're already in the credits! We must've had a previous go-around. :-> But yes, #424 is waiting patiently for you. :->

iago-lito commented 6 months ago

Uh? That's funny. I have no recollection of this ^ ^" Do you happen to know when or why?

bhaller commented 6 months ago

Uh? That's funny. I have no recollection of this ^ ^" Do you happen to know when or why?

Nope. :->