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/charselectenhanced.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scribus/charselectenhanced.cpp') diff --git a/scribus/charselectenhanced.cpp b/scribus/charselectenhanced.cpp index 581b438..941f9dd 100644 --- a/scribus/charselectenhanced.cpp +++ b/scribus/charselectenhanced.cpp @@ -33,7 +33,7 @@ CharSelectEnhanced::CharSelectEnhanced(QWidget* parent) // signals and slots connections connect(deleteButton, SIGNAL(clicked()), this, SLOT(delEdit())); connect(insertButton, SIGNAL(clicked()), this, SLOT(insChar())); - connect(m_charTable, SIGNAL(selectChar(uint)), this, SLOT(newChar(uint))); + connect(m_charTable, SIGNAL(selectChar(uint, QString)), this, SLOT(newChar(uint, QString))); connect(fontSelector, SIGNAL(activated(int)), this, SLOT(newFont(int))); connect(rangeSelector, SIGNAL(activated(int)), this, SLOT(newCharClass(int))); connect(hexLineEdit, SIGNAL(returnPressed()), @@ -66,6 +66,11 @@ void CharSelectEnhanced::setDoc(ScribusDoc* doc) // tDebug("CharSelectEnhanced setDoc end"); } +QString CharSelectEnhanced::getUsedFont() +{ + return m_fontInUse; +} + void CharSelectEnhanced::scanFont() { // tDebug("scanFont start"); @@ -410,7 +415,7 @@ void CharSelectEnhanced::newFont(int font) // tDebug("newFont end"); } -void CharSelectEnhanced::newChar(uint i) +void CharSelectEnhanced::newChar(uint i, QString) { chToIns += QChar(i); sample->setPixmap(FontSample((*m_doc->AllFonts)[m_fontInUse], 28, chToIns, palette().color(QPalette::Window), true)); @@ -456,7 +461,7 @@ void CharSelectEnhanced::hexLineEdit_returnPressed() bool ok = false; uint code = tx.arg(hexLineEdit->text()).toUInt(&ok, 16); if ((ok) && (code > 31)) - newChar(code); + newChar(code, m_fontInUse); } void CharSelectEnhanced::changeEvent(QEvent *e) -- cgit