From 29a4ed0ad2e2e80864a5645f2c98728d71f8be2f Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Tue, 22 May 2018 23:27:40 +0200 Subject: [PATCH] Added slot for return in add ingredients input field. --- gui/newrecipedialog.cpp | 4 ++++ gui/newrecipedialog.h | 2 ++ gui/newrecipedialog.ui | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gui/newrecipedialog.cpp b/gui/newrecipedialog.cpp index 1d9a6c5..4937851 100644 --- a/gui/newrecipedialog.cpp +++ b/gui/newrecipedialog.cpp @@ -149,3 +149,7 @@ void NewRecipeDialog::on_removeTagButton_clicked(){ this->populateTagsBox(); } } + +void NewRecipeDialog::on_ingredientLineEdit_returnPressed(){ + this->on_addIngredientButton_clicked(); +} diff --git a/gui/newrecipedialog.h b/gui/newrecipedialog.h index 99d7af8..0c3e986 100644 --- a/gui/newrecipedialog.h +++ b/gui/newrecipedialog.h @@ -55,6 +55,8 @@ class NewRecipeDialog : public QDialog void on_removeTagButton_clicked(); + void on_ingredientLineEdit_returnPressed(); + private: Ui::NewRecipeDialog *ui; RecipeDatabase *recipeDB; diff --git a/gui/newrecipedialog.ui b/gui/newrecipedialog.ui index d59410c..068f8af 100644 --- a/gui/newrecipedialog.ui +++ b/gui/newrecipedialog.ui @@ -640,11 +640,14 @@ QPushButton#removeIngredientButton:pressed{ QFrame::NoFrame - QAbstractItemView::MultiSelection + QAbstractItemView::SingleSelection QAbstractItemView::ScrollPerPixel + + QAbstractItemView::ScrollPerPixel + 100