Anyway to "force close" a layer?

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Anyway to "force close" a layer?

Post by Saka » November 26th, 2016, 5:50 am

Is there any way to "force delete" a layer without asking the user to save? Would be very helpful if there were.

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Anyway to "force close" a layer?

Post by GUYTU6J » November 26th, 2016, 6:40 am

How about settings under File-Preferences-Layer?

User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Re: Anyway to "force close" a layer?

Post by Saka » November 26th, 2016, 7:46 am

GUYTU6J wrote:How about settings under File-Preferences-Layer?
ah thanks. I'm on mobile so question:
Can I edit options with scripts? I'm using python.

User avatar
dvgrn
Moderator
Posts: 10685
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Anyway to "force close" a layer?

Post by dvgrn » November 26th, 2016, 10:06 pm

Saka wrote:
GUYTU6J wrote:How about settings under File-Preferences-Layer?
ah thanks. I'm on mobile so question:
Can I edit options with scripts? I'm using python.
Not that particular option. g.setoption() generally lets you get at options that can be accessed directly from the menus, but Preferences are supposed to be decisions to be made by the user, and therefore beyond the reach of scripts.

In this case, I always uncheck all the check boxes under File > Preferences > Layer, so I never see the problem you're describing. (Instead, if I run scripts that indiscriminately remove layers, or if I click to close them manually, Golly silently throws away my work -- but it seems better to be careful to save my work when I want to save it, than to be annoyed by those incessant popups all the time.)

User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Re: Anyway to "force close" a layer?

Post by Saka » November 26th, 2016, 10:12 pm

So no. I will just add that to the golly suggestions and add that to the instructions for the script.



EDIT: Turns out I did post the suggestion :lol:

Post Reply