22 lines
811 B
Diff
22 lines
811 B
Diff
|
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
|
||
|
index 9aa7bed..1186158 100644
|
||
|
--- a/src/searchnoteswidget.cpp
|
||
|
+++ b/src/searchnoteswidget.cpp
|
||
|
@@ -946,6 +946,8 @@ bool SearchNotesWidget::on_treeview_button_released(GdkEventButton *ev)
|
||
|
|
||
|
bool SearchNotesWidget::on_treeview_key_pressed(GdkEventKey * ev)
|
||
|
{
|
||
|
+ Gtk::Menu *menu = get_note_list_context_menu();
|
||
|
+
|
||
|
switch(ev->keyval) {
|
||
|
case GDK_KEY_Delete:
|
||
|
delete_selected_notes();
|
||
|
@@ -955,7 +957,6 @@ bool SearchNotesWidget::on_treeview_key_pressed(GdkEventKey * ev)
|
||
|
// Pop up the context menu if a note is selected
|
||
|
Note::List selected_notes = get_selected_notes();
|
||
|
if(!selected_notes.empty()) {
|
||
|
- Gtk::Menu *menu = get_note_list_context_menu();
|
||
|
popup_context_menu_at_location(menu, 0, 0);
|
||
|
}
|
||
|
break;
|