Page 1 of 1

Refresh Images

Posted: Tue Feb 16, 2016 6:17 am
by joolean
What does 'Refresh images' and 'Refresh objects' in the Edit menu do?
I can't find any mention of them in the help via the search function nor even on these forums.

I have an image in Rube that frequently gets changed externally and I use a script hook tied to key_press in Rube to refresh it with:

string filepath = img.getFile();
img.setFile('');
img.setFile(filepath);

Is 'Refresh images' meant to do that or does it have another purpose?

Re: Refresh Images

Posted: Thu Feb 18, 2016 1:21 pm
by iforce2d
Yes, it is meant to update the image/object after it has been changed externally.

You can have this done automatically so that you don't need to push a key or make a script. Look in the "Editing" tab of the Options dialog, check the checkbox and set a time to check for changes.

Re: Refresh Images

Posted: Thu Feb 18, 2016 6:09 pm
by joolean
Thanks for the reply iforce but neither 'Refresh images' nor turning on those auto-refresh options in Editing works.
I'm running 1.7.3 on Win 7 64.

Are you using win api events or the QT equivalent to be notified of changes or checking manually? Perhaps there's something on my system that is blocking those events for some reason.
Watching along on Process Monitor though there is no activity when using 'Refresh images' from the Edit menu.

It's no biggie though as the script solution works fine.

Re: Refresh Images

Posted: Fri Feb 19, 2016 1:53 pm
by iforce2d
Are they regular files? It may not work for files accessed through network shares, or even files in different partitions.
I'm checking manually, but that should be irrelevant for the case where you trigger the refresh yourself.

Re: Refresh Images

Posted: Sat Feb 20, 2016 9:13 am
by joolean
Just regular png files on the same partition.
When I select 'Refresh images' from the menu, just nothing seems to happen. I don't see any file operations in Process Monitor.

Re: Refresh Images

Posted: Sun Feb 21, 2016 6:25 am
by iforce2d
I just tried this myself and it seems to be not working... sorry I didn't check earlier. I'll see if I can figure out where this started to go wrong.

Re: Refresh Images

Posted: Sun Feb 21, 2016 12:39 pm
by iforce2d
arrghh... it was commented out for some reason. It's not really worth a new release version so I have made the change in the 1.7.3 code. You can download it again to get a fixed version. I have started a build for you. Thanks for the report!

Re: Refresh Images

Posted: Sun Feb 21, 2016 1:46 pm
by joolean
lol that's pretty funny. The new version works fine.
Thanks for that.