summaryrefslogtreecommitdiffstats
path: root/tdeui/keditlistbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeui/keditlistbox.cpp')
-rw-r--r--tdeui/keditlistbox.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp
index 4b224ede..142c4b43 100644
--- a/tdeui/keditlistbox.cpp
+++ b/tdeui/keditlistbox.cpp
@@ -175,11 +175,13 @@ void KEditListBox::typedSomething(const TQString& text)
// but TT disagree with me on this one (it's been that way since ages ... grrr)
bool block = m_listBox->signalsBlocked();
const TQString& oldText = currentText();
+ int item = currentItem();
m_listBox->blockSignals( true );
- m_listBox->changeItem(text, currentItem());
+ m_listBox->changeItem(text, item);
m_listBox->blockSignals( block );
emit changed();
emit renamed(oldText, text);
+ emit renamed(item, oldText, text);
}
}
@@ -280,7 +282,8 @@ void KEditListBox::addItem()
m_lineEdit->clear();
m_lineEdit->blockSignals(block);
- m_listBox->setSelected(currentItem(), false);
+ int item = currentItem();
+ m_listBox->setSelected(item, false);
if (!alreadyInList)
{
@@ -289,7 +292,8 @@ void KEditListBox::addItem()
m_listBox->insertItem(currentTextLE);
m_listBox->blockSignals( block );
emit changed();
- emit added( currentTextLE );
+ emit added( currentTextLE );
+ emit added( item, currentTextLE );
}
}
@@ -302,18 +306,19 @@ int KEditListBox::currentItem() const
void KEditListBox::removeItem()
{
- int selected = m_listBox->currentItem();
+ int item = m_listBox->currentItem();
- if ( selected >= 0 )
+ if ( item >= 0 )
{
- TQString removedText = m_listBox->currentText();
+ TQString removedText = m_listBox->currentText();
- m_listBox->removeItem( selected );
+ m_listBox->removeItem( item );
if ( count() > 0 )
- m_listBox->setSelected( TQMIN( selected, count() - 1 ), true );
+ m_listBox->setSelected( TQMIN( item, count() - 1 ), true );
emit changed();
- emit removed( removedText );
+ emit removed( removedText );
+ emit removed( item, removedText );
}
if ( servRemoveButton && m_listBox->currentItem() == -1 )