int tbId = -1;
for ( ToolBarMap::ConstIterator it = myToolBars.begin(); it != myToolBars.end() && tbId == -1; ++it )
{
- // NKV - BUG IPAL19144 - search by toolbar title is done below via find() function
- // if ( it.value().toolBar->windowTitle().toLower() == title.toLower() )
- // tbId = it.key();
- if (it.key() == tid) tbId = it.key();
+ if( it.value().toolBar->windowTitle().toLower() == title.toLower() &&
+ ( !mw || it.value().toolBar->parent()==mw ) )
+ tbId = it.key();
}
if ( tbId != -1 )
if ( !tb )
{
tb = new QtxToolBar( true, tbw );
- mainWindow()->addToolBar( tb );
+ //mainWindow()->addToolBar( tb );
tb->setWindowTitle( title );
tb->setObjectName( title );
}