* the last selected by user item in myInList or myOutList (myLastItem)
*/
void SUPERVGUI_ManagePortsDlg::nameChanged( const QString& name ) {
+ // mkr: IPAL12512
+ if ( isEditingItem( myLastItem, myInList ) && myInList->findItem( QString( "%1 (%2)" ).arg( name ).arg( ((PortListItem*)myLastItem)->PortType ))
+ ||
+ isEditingItem( myLastItem, myOutList ) && myOutList->findItem( QString( "%1 (%2)" ).arg( name ).arg( ((PortListItem*)myLastItem)->PortType ))) {
+ disconnect( myNameEdt, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+
+ myNameEdt->setText( ((PortListItem*)myLastItem)->PortName );
+
+ connect( myNameEdt, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ QMessageBox::warning( this, tr("ERROR"), tr("MSG_PORT_EXIST") );
+ return;
+ }
+
if ( isEditingItem( myLastItem, myInList ) || isEditingItem( myLastItem, myOutList ) ) {
((PortListItem*)myLastItem)->PortName = name;
//myLastItem->listBox()->repaint( true );