Commit fef5d83e authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Hide plot2d and plot3d button when the plot cannot be plotted

This makes it possible to waste less space.
parent 44d2aad2
...@@ -126,7 +126,7 @@ Kirigami.ScrollablePage { ...@@ -126,7 +126,7 @@ Kirigami.ScrollablePage {
] ]
actions: [ actions: [
Kirigami.Action { Kirigami.Action {
enabled: App.functionsModel().canAddFunction(expression, 2, App.variables) visible: App.functionsModel().canAddFunction(expression, 2, App.variables)
text: i18n("2D Plot") text: i18n("2D Plot")
onTriggered: { onTriggered: {
App.functionsModel().addFunction(expression, 2, App.variables) App.functionsModel().addFunction(expression, 2, App.variables)
...@@ -134,7 +134,7 @@ Kirigami.ScrollablePage { ...@@ -134,7 +134,7 @@ Kirigami.ScrollablePage {
} }
}, },
Kirigami.Action { Kirigami.Action {
enabled: App.functionsModel().canAddFunction(expression, 4, App.variables) visible: App.functionsModel().canAddFunction(expression, 4, App.variables)
text: i18n("3D Plot") text: i18n("3D Plot")
onTriggered: { onTriggered: {
App.functionsModel().addFunction(expression, 4, App.variables) App.functionsModel().addFunction(expression, 4, App.variables)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment