From 1f81f3c2db68bd5dc182226d953e36ee0ebfc9c9 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 1 Jun 2005 11:53:42 +0000 Subject: [PATCH] *** empty log message *** --- src/PythonConsole/PythonConsole_PyEditor.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PythonConsole/PythonConsole_PyEditor.cxx b/src/PythonConsole/PythonConsole_PyEditor.cxx index cbb4627f7..da6b4df66 100755 --- a/src/PythonConsole/PythonConsole_PyEditor.cxx +++ b/src/PythonConsole/PythonConsole_PyEditor.cxx @@ -677,12 +677,16 @@ QPopupMenu* PythonConsole_PyEditor::createPopupMenu( const QPoint& pos ) { QPopupMenu* popup = QTextEdit::createPopupMenu( pos ); + QValueList ids; for ( int i = 0; popup && i < popup->count(); i++ ) { if ( !popup->isItemEnabled( popup->idAt( i ) ) ) - popup->removeItemAt( i ); + ids.append( popup->idAt( i ) ); } + for ( QValueList::const_iterator it = ids.begin(); it != ids.end(); ++it ) + popup->removeItem( *it ); + SUIT_Tools::simplifySeparators( popup ); return popup; -- 2.39.2