Fixed #387: Paste word into new tab looks up ALL dics instead of currently selected group

This commit is contained in:
Tvangeste 2013-08-22 18:05:39 +02:00
parent cc29074f51
commit 8a10e997b4

View file

@ -1621,7 +1621,16 @@ void ArticleView::pasteTriggered()
QApplication::clipboard()->text() ) ) );
if ( text.size() )
showDefinition( text, getGroup( ui.definition->url() ), getCurrentArticle() );
{
unsigned groupId = getGroup( ui.definition->url() );
if ( groupId == 0 )
{
// We couldn't figure out the group out of the URL,
// so let's try the currently selected group.
groupId = groupComboBox->getCurrentGroup();
}
showDefinition( text, groupId, getCurrentArticle() );
}
}
void ArticleView::moveOneArticleUp()