[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/utils/krecipes/src/dialogs
From: Jason Kivlighn <fungmeista () gmail ! com>
Date: 2005-05-30 5:01:34
Message-ID: 1117429294.546868.11331.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 419626 by jkivlighn:
This small 3-line change gets rid of a rather annoying 5-or-so-second delay after \
entering an ingredient into a recipe on large databases.
M +4 -3 recipeinputdialog.cpp
--- trunk/extragear/utils/krecipes/src/dialogs/recipeinputdialog.cpp #419625:419626
@@ -1053,12 +1053,13 @@
void RecipeInputDialog::createNewIngredientIfNecessary()
{
if ( !ingredientBox->currentText().stripWhiteSpace().isEmpty() &&
- database->findExistingIngredientByName( \
ingredientBox->currentText().stripWhiteSpace() ) == -1 ) { + \
database->findExistingIngredientByName( \
ingredientBox->currentText().stripWhiteSpace() ) == -1 ) { QString newIngredient( \
ingredientBox->currentText() ); database->createNewIngredient( newIngredient );
- ingredientComboList->clear();
- loadIngredientListCombo();
+ ingredientComboList->append( Element( newIngredient, database->lastInsertID() ) );
+ ingredientBox->insertItem( newIngredient );
+ ingredientBox->completionObject() ->addItem( newIngredient );
QString saveUnit( unitBox->currentText() );
ingredientBox->setCurrentItem( newIngredient );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic