allow strutting into new columns if not multiselecting
parent
9bed15f564
commit
00cfb9df3a
4
notes
4
notes
|
@ -42,7 +42,9 @@ TODO {
|
||||||
|
|
||||||
- fix space on note or port column (previewing) generating an undo action
|
- fix space on note or port column (previewing) generating an undo action
|
||||||
- make space preview on port column
|
- make space preview on port column
|
||||||
fix strut not working except to overwrite another param
|
- fix strut not working except to overwrite another param
|
||||||
|
|
||||||
|
add negate function to param columns
|
||||||
|
|
||||||
revert-to-saved menu action
|
revert-to-saved menu action
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ bool PatternEditorItemDelegate::eventFilter(QObject *obj, QEvent *event) {
|
||||||
bool PatternEditorItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option [[maybe_unused]], const QModelIndex &index) {
|
bool PatternEditorItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option [[maybe_unused]], const QModelIndex &index) {
|
||||||
if (index.data().isNull()) return false; // no channels?
|
if (index.data().isNull()) return false; // no channels?
|
||||||
auto type = event->type();
|
auto type = event->type();
|
||||||
if (type == QEvent::KeyRelease) qDebug() << "key release";
|
//if (type == QEvent::KeyRelease) qDebug() << "key release";
|
||||||
if (type == QEvent::KeyPress) {
|
if (type == QEvent::KeyPress) {
|
||||||
if (static_cast<QKeyEvent*>(event)->isAutoRepeat()) return false; // reject autorepeat
|
if (static_cast<QKeyEvent*>(event)->isAutoRepeat()) return false; // reject autorepeat
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ bool PatternEditorItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *m
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (k == Qt::Key_Space) { // TODO make this not "modify" if nothing was affected
|
if (k == Qt::Key_Space) { // TODO make this not "modify" if nothing was affected
|
||||||
if (mod & Qt::Modifier::SHIFT) return dc->cancel(); // TODO: once playback is a thing, shift+space to preview row?
|
if (mod & Qt::Modifier::SHIFT) return dc->cancel(); // nothing on shift yet
|
||||||
|
|
||||||
dc->cancel();
|
dc->cancel();
|
||||||
SelectionBounds s(sel);
|
SelectionBounds s(sel);
|
||||||
|
@ -207,6 +207,7 @@ bool PatternEditorItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *m
|
||||||
auto mp = s.maxParamSelected(c);
|
auto mp = s.maxParamSelected(c);
|
||||||
if (mp < 0) continue;
|
if (mp < 0) continue;
|
||||||
auto mps = std::min(mpc, static_cast<size_t>(mp));
|
auto mps = std::min(mpc, static_cast<size_t>(mp));
|
||||||
|
if (!multi) mps++; // allow strutting into new columns if not multiselecting
|
||||||
for (int r = s.y1; r <= s.y2; r++) {
|
for (int r = s.y1; r <= s.y2; r++) {
|
||||||
if (multi && mps <= p->rowAt(c, r).numParams()) continue;
|
if (multi && mps <= p->rowAt(c, r).numParams()) continue;
|
||||||
auto* dc = new PatternDeltaCommand(p, c, r-1);
|
auto* dc = new PatternDeltaCommand(p, c, r-1);
|
||||||
|
|
Loading…
Reference in New Issue