]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
*** empty log message ***
authorstv <stv@opencascade.com>
Wed, 1 Jun 2005 11:53:42 +0000 (11:53 +0000)
committerstv <stv@opencascade.com>
Wed, 1 Jun 2005 11:53:42 +0000 (11:53 +0000)
src/PythonConsole/PythonConsole_PyEditor.cxx

index cbb4627f79e708eff7c4140a5191b3760d855998..da6b4df6605303b0c7035c9e4427b514894b803d 100755 (executable)
@@ -677,12 +677,16 @@ QPopupMenu* PythonConsole_PyEditor::createPopupMenu( const QPoint& pos )
 {
   QPopupMenu* popup = QTextEdit::createPopupMenu( pos );
 
+  QValueList<int> 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<int>::const_iterator it = ids.begin(); it != ids.end(); ++it )
+    popup->removeItem( *it );
+
   SUIT_Tools::simplifySeparators( popup );
 
   return popup;