Skip to content

Commit 706e81b

Browse files
committed
load dataset in UI via enter/return key
1 parent 9f684e9 commit 706e81b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

larray_editor/editor.py

+7
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ def __init__(self, index, parent=None):
257257
layout.addWidget(self.advanced_button)
258258
self.setLayout(layout)
259259

260+
260261
def show_context_menu(self, position):
261262
menu = QMenu(self)
262263

@@ -325,6 +326,12 @@ def view_eurostat_indicator(self, index):
325326
QMessageBox.critical(self, "Error", "Failed to load {}".format(code))
326327

327328

329+
def keyPressEvent(self, event):
330+
if event.key() in [Qt.Key_Return, Qt.Key_Enter] and self.tree.hasFocus():
331+
self.view_eurostat_indicator(self.tree.currentIndex())
332+
super(EurostatBrowserDialog, self).keyPressEvent(event)
333+
334+
328335
def handle_search(self, text):
329336

330337
def search_term_filter_df(df, text):

0 commit comments

Comments
 (0)