Skip to content

Commit

Permalink
Fix adding new gradients and palettes
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Oct 27, 2023
1 parent 9958c25 commit 7bb6415
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions source/app/ui/qml/app/graphia/Controls/GradientSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Window
gradientListModel.remove(index);
}

function add(configuration)
function addPreset(configuration)
{
let savedGradients = savedGradientsFromPreferences();
savedGradients.unshift(JSON.parse(configuration));
Expand Down Expand Up @@ -211,7 +211,7 @@ Window

onClicked: function(mouse)
{
gradientPresets.add(gradientEditor.configuration);
gradientPresets.addPreset(gradientEditor.configuration);
}
}

Expand Down Expand Up @@ -269,7 +269,7 @@ Window
{
// Add a preset too, if it doesn't exist already
if(gradientPresets.selectedIndex < 0)
gradientPresets.add(gradientEditor.configuration);
gradientPresets.addPreset(gradientEditor.configuration);

visuals.defaultGradient = gradientEditor.configuration;
}
Expand Down
6 changes: 3 additions & 3 deletions source/app/ui/qml/app/graphia/Controls/PaletteSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Window
paletteListModel.remove(index);
}

function add(configuration)
function addPreset(configuration)
{
let savedPalettes = savedPalettesFromPreferences();
savedPalettes.unshift(JSON.parse(configuration));
Expand Down Expand Up @@ -215,7 +215,7 @@ Window

onClicked: function(mouse)
{
palettePresets.add(paletteEditor.configuration);
palettePresets.addPreset(paletteEditor.configuration);
}
}

Expand Down Expand Up @@ -273,7 +273,7 @@ Window
{
// Add a preset too, if it doesn't exist already
if(palettePresets.selectedIndex < 0)
palettePresets.add(paletteEditor.configuration);
palettePresets.addPreset(paletteEditor.configuration);

visuals.defaultPalette = paletteEditor.configuration;
}
Expand Down

0 comments on commit 7bb6415

Please sign in to comment.