From f9ea35cd2131feb62f6157f79c4d453cf0307d94 Mon Sep 17 00:00:00 2001 From: fschmid Date: Sat, 4 Feb 2012 23:06:22 +0000 Subject: Fixed Bug 10336: "Inserted glyph is not of the requested font" by backporting the relevant changes from 1.5.0svn git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17279 11d20701-8431-0410-a711-e3c959e3b870 --- scribus/chartableview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scribus/chartableview.cpp') diff --git a/scribus/chartableview.cpp b/scribus/chartableview.cpp index bbc16eb..94497bf 100644 --- a/scribus/chartableview.cpp +++ b/scribus/chartableview.cpp @@ -77,7 +77,7 @@ void CharTableView::mousePressEvent(QMouseEvent* e) int index = currenCharactersIndex(); int currentChar = -1; - if (index < model()->characters().count()) + if ((index < model()->characters().count()) && (model()->characters().count() > 0)) currentChar = model()->characters()[index]; if (e->button() == Qt::RightButton && currentChar > -1) @@ -117,7 +117,7 @@ void CharTableView::mouseReleaseEvent(QMouseEvent* e) void CharTableView::viewDoubleClicked(const QModelIndex & /*index*/) { if (model()->characters().count() > currenCharactersIndex()) - emit selectChar(model()->characters()[currenCharactersIndex()]); + emit selectChar(model()->characters()[currenCharactersIndex()], model()->fonts()[currenCharactersIndex()]); } int CharTableView::currenCharactersIndex() -- cgit