Fix connection category target computation

This commit is contained in:
crschnick 2023-12-29 00:40:17 +00:00
parent a533de0300
commit dd87d07e1f
2 changed files with 30 additions and 5 deletions

View file

@ -110,13 +110,22 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
name.getValue(),
store.getValue());
var p = provider.getValue().getDisplayParent(testE);
var targetCategory = p != null
? p.getCategoryUuid()
: DataStorage.get()
.getSelectedCategory()
.getUuid();
var rootCategory = DataStorage.get().getRootCategory(DataStorage.get().getStoreCategoryIfPresent(targetCategory).orElseThrow());
// Don't put connections in the scripts category ever
if (!provider.getValue().getCreationCategory().equals(DataStoreProvider.CreationCategory.SCRIPT) &&
rootCategory.equals(DataStorage.get().getAllScriptsCategory())) {
targetCategory = DataStorage.get().getDefaultCategory().getUuid();
}
return DataStoreEntry.createNew(
UUID.randomUUID(),
p != null
? p.getCategoryUuid()
: DataStorage.get()
.getSelectedCategory()
.getUuid(),
targetCategory,
name.getValue(),
store.getValue());
}, name, store);

16
dist/changelogs/1.7.13.md vendored Normal file
View file

@ -0,0 +1,16 @@
## New professional features
- Add ability to open files and directories in VSCode SSH remote environment in file browser
- Added support for fully offline licenses. You can obtain them via email request
in case you're running it on a system without internet connectivity or restricted proxy settings
## Changes
## Additions
## Fixes
- Fix connections being accidentally listed under scripts category
if they were added while scripts category was selected