value negation

master
Zithia Satazaki 2022-03-29 14:54:41 -04:00
parent 00cfb9df3a
commit 29b0367dfb
2 changed files with 6 additions and 1 deletions

3
notes
View File

@ -44,7 +44,8 @@ TODO {
- make space preview on port column
- fix strut not working except to overwrite another param
add negate function to param columns
- add negate function to param columns
multi select negate
revert-to-saved menu action

View File

@ -323,6 +323,10 @@ bool PatternEditorItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *m
view->setCurrentIndex(index.siblingAtColumn(index.column()+1));
return dc->commit();
} else {
if (k == Qt::Key_Minus) { // negate current value
row.param(par)[1] *= -1;
return dc->commit();
}
if (k == Qt::Key_Comma) { // convenience; allow inserting an extend from number column
if (row.numParams() >= PatternEditorModel::paramSoftCap) return dc->cancel();
row.insertParam(par+1, ',');