When Shortcut edit tree view lost input focus currently selected item returns the initial shortcut value.
Now the focusOut() method checks the necessity of selected item resetting to initial state.
}
for( ShortcutMap::const_iterator it = theShortcutMap.constBegin(); it != theShortcutMap.constEnd(); ++it )
item->addChild( new QTreeWidgetItem( QStringList() << it.key() << it.value() ) );
- myPrevBindings.insert( title, theShortcutMap);
+ myPrevBindings.insert( title, theShortcutMap );
}
/*!
void QtxShortcutTree::focusOutEvent ( QFocusEvent* event )
{
QWidget::focusOutEvent( event );
- if ( currentItem() && currentItem()->isSelected() )
+
+ if ( currentItem() && currentItem()->isSelected() && currentItem()->text( 1 ).endsWith( "+" ) )
currentItem()->setText( 1, myPrevBindings[ currentItem()->parent()->text( 0 ) ][ currentItem()->text( 0 ) ] );
}