yann300 10 years ago
committed by yann300
parent
commit
b7070ec12f
  1. 1
      mix/qml/StateDialog.qml
  2. 1
      mix/qml/StateList.qml
  3. 5
      mix/qml/StateListModel.qml

1
mix/qml/StateDialog.qml

@ -167,6 +167,7 @@ Window {
onClicked: transactionsModel.editTransaction(index)
}
ToolButton {
visible: !transactionsModel.get(index).executeConstructor
text: qsTr("Delete");
Layout.fillHeight: true
onClicked: transactionsModel.deleteTransaction(index)

1
mix/qml/StateList.qml

@ -48,6 +48,7 @@ Rectangle {
onClicked: list.model.editState(index);
}
ToolButton {
visible: !list.model.isDefaultState(index)
text: qsTr("Delete");
Layout.fillHeight: true
onClicked: list.model.deleteState(index);

5
mix/qml/StateListModel.qml

@ -176,6 +176,11 @@ Item {
runState(defaultStateIndex);
}
function isDefaultState(index)
{
return index === defaultStateIndex;
}
function runState(index) {
var item = stateList[index];
clientModel.setupState(item);

Loading…
Cancel
Save