diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-04-23 22:43:59 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-04-23 22:43:59 +0000 |
commit | 593be37c193d860113867c5aae0c3b241bc73528 (patch) | |
tree | 2212e6f6ab4e23b7adceb944bedad918b7d54144 /muse2 | |
parent | 9c6c457618565fda91eb27b8ac6929d720531386 (diff) |
key dropdown
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/ChangeLog | 2 | ||||
-rw-r--r-- | muse2/muse/master/lmaster.cpp | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index e90db090..a3e4706c 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,5 @@ +24.04.2011: + - Improved master list editor editing of keys, dropdown should not 'stay behind' anymore (rj) 21.04.2011: - Fixed drag&drop plugin instantantiation (again), was using a string pointer to private data now copies the data before use (rj) 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); + } |