summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2011-04-23 22:43:59 +0000
committerRobert Jonsson <spamatica@gmail.com>2011-04-23 22:43:59 +0000
commit593be37c193d860113867c5aae0c3b241bc73528 (patch)
tree2212e6f6ab4e23b7adceb944bedad918b7d54144 /muse2/muse
parent9c6c457618565fda91eb27b8ac6929d720531386 (diff)
key dropdown
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/master/lmaster.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index 295dfb52..5c767060 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -79,10 +79,12 @@ QString keyToString(key_enum key) //flo
case KEY_B_BEGIN:
case KEY_B_END:
printf("ILLEGAL FUNCTION CALL: keyToString called with key_sharp_begin etc.\n");
+ return "";
break;
default:
printf("ILLEGAL FUNCTION CALL: keyToString called with illegal key value (not in enum)\n");
+ return "";
}
return keyStrs[index];
}
@@ -457,8 +459,12 @@ void LMaster::itemPressed(QTreeWidgetItem* i, int column)
if (editorColumn != column || editedItem != i)
returnPressed();
}
- else
+ else {
+ if (key_editor)
+ key_editor->hide();
+ setFocus();
editorColumn = column;
+ }
}
//---------------------------------------------------------
@@ -514,9 +520,11 @@ void LMaster::itemDoubleClicked(QTreeWidgetItem* i)
key_editor->addItems(keyStrs);
}
//key_editor->setText(editedItem->text(LMASTER_VAL_COL));
- key_editor->setCurrentIndex(keyStrs.indexOf(editedItem->text(LMASTER_VAL_COL)));
+ //key_editor->setCurrentIndex(keyStrs.indexOf(editedItem->text(LMASTER_VAL_COL)));
+ //key_editor->setCurrentIndex(-1);
key_editor->setGeometry(itemRect);
key_editor->show();
+ key_editor->showPopup();
key_editor->setFocus();
//key_editor->selectAll();
connect(key_editor, SIGNAL(currentIndexChanged(int)), SLOT(returnPressed()));
@@ -782,6 +790,7 @@ LMasterKeyEventItem::LMasterKeyEventItem(QTreeWidget* parent, const KeyEvent& ev
setText(1, c2);
setText(2, c3);
setText(3, c4);
+
}