Commit 53924104 authored by Mike Kremer's avatar Mike Kremer

Checking in Jan's fix for the undo/redo context menu entries. Seems to work as supposed.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11414 383ad7c9-94d9-4d36-a494-682f7c89f535
parent cfeefffa
......@@ -537,15 +537,18 @@ bool CoreWidget::addContextMenus( QMenu* _menu , ContextMenuType _type , int _id
// Remove Plugin Name from string
visible.replaceInStrings(QRegExp(".*>"), "");
// Remove accelerator specifications
visible.replaceInStrings("&", "");
while (it.hasNext()) {
it.next();
if (visible.contains(it.key())) {
_menu->addAction( it.value() );
}
it.next();
for ( int i = 0 ; i < visible.size(); ++i ) {
if ( it.key().contains(visible[i]) ) {
_menu->addAction( it.value() );
}
}
}
_menu->addSeparator();
......@@ -555,16 +558,19 @@ bool CoreWidget::addContextMenus( QMenu* _menu , ContextMenuType _type , int _id
while (it2.hasNext()) {
it2.next();
if (visible.contains(it2.key())) {
_menu->addAction( it2.value() );
}
for ( int i = 0 ; i < visible.size(); ++i ) {
if ( it2.key().contains(visible[i]) ) {
_menu->addAction( it2.value() );
}
}
}
return added;
}
/** \brief check current context and initialize context menu according to this context.
*
* This function is called whenever a context menu for the corewidget is requested.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment