Avogadro2 1.98.1,App Crashes When I click on one of the options available in select menu

When I clicked on **Create New layer from Selection ** from select menu the app crashes .

I ran the application on windows 11 version 10.0.2261 .

Is this a bug or problem with my system ?

It’s definitely a bug. Just got it to crash on my Mac. Clearly it wasn’t tested with no molecule / selection.

Should i work on it? this menu application is in which repo the library one or the app one
?

If you want to give it a try, the appropriate code would be here:

i will give it a try thx

@ghutchis can you tell whats the exact function of the Create New Layer from Selection

In documentation of avogadro 2 theres no mention of this option
instead there is Add named Selection

A new layer is created and any selected atoms are moved to it. So if you draw two ethane molecules and select one, then click that option, you will then have two layers, with one ethane molecule in each.

A faster way of adding a layer, then selecting an object, then changing its layer from the Selection panel.

thanks @matterhorn103

@matterhorn103 @ghutchis can you clarify my doubt

suppose i didnt select any atom then i shouldnt create a new layer right when i press
create new layer from Selection

I mean, the app should never crash.

@ghutchis I have updated code should i create a PR. you can review it .

Of course. PRs always welcome.