r17278 by fschmid - Don't let the StoryEditor destroy the CharSelectTable.
scribus-commit
scribus-commit at lists.scribus.net
Sat Feb 4 23:04:46 UTC 2012
Author: fschmid
Date: Sat Feb 4 23:04:46 2012
New Revision: 17278
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17278
Log:
Don't let the StoryEditor destroy the CharSelectTable.
Modified:
trunk/Scribus/scribus/chartablemodel.cpp
trunk/Scribus/scribus/chartablemodel.h
trunk/Scribus/scribus/ui/storyeditor.cpp
Modified: trunk/Scribus/scribus/chartablemodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17278&path=/trunk/Scribus/scribus/chartablemodel.cpp
==============================================================================
--- trunk/Scribus/scribus/chartablemodel.cpp (original)
+++ trunk/Scribus/scribus/chartablemodel.cpp Sat Feb 4 23:04:46 2012
@@ -123,6 +123,15 @@
reset();
}
+void CharTableModel::setCharactersAndFonts(CharClassDef ch, QStringList fonts)
+{
+ m_characters.clear();
+ m_fonts.clear();
+ m_characters = ch;
+ m_fonts = fonts;
+ reset();
+}
+
void CharTableModel::addCharacter(QString ch)
{
int orig = rowCount();
Modified: trunk/Scribus/scribus/chartablemodel.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17278&path=/trunk/Scribus/scribus/chartablemodel.h
==============================================================================
--- trunk/Scribus/scribus/chartablemodel.h (original)
+++ trunk/Scribus/scribus/chartablemodel.h Sat Feb 4 23:04:46 2012
@@ -45,6 +45,7 @@
ScFace fontFace();
void setCharacters(CharClassDef ch);
+ void setCharactersAndFonts(CharClassDef ch, QStringList fonts);
void addCharacter(QString ch);
CharClassDef characters() {
return m_characters;
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17278&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Sat Feb 4 23:04:46 2012
@@ -1564,7 +1564,7 @@
void StoryEditor::showEvent(QShowEvent *)
{
charSelect = new CharSelect(this);
- charSelect->userTableModel()->setCharacters(ScCore->primaryMainWindow()->charPalette->userTableModel()->characters());
+ charSelect->userTableModel()->setCharactersAndFonts(ScCore->primaryMainWindow()->charPalette->userTableModel()->characters(), ScCore->primaryMainWindow()->charPalette->userTableModel()->fonts());
connect(charSelect, SIGNAL(insertSpecialChar()), this, SLOT(slot_insertSpecialChar()));
connect(charSelect, SIGNAL(insertUserSpecialChar(QChar, QString)), this, SLOT(slot_insertUserSpecialChar(QChar, QString)));
@@ -1577,7 +1577,7 @@
if (charSelect)
{
if (charSelectUsed)
- ScCore->primaryMainWindow()->charPalette->userTableModel()->setCharacters(charSelect->userTableModel()->characters());
+ ScCore->primaryMainWindow()->charPalette->userTableModel()->setCharactersAndFonts(charSelect->userTableModel()->characters(), charSelect->userTableModel()->fonts());
if (charSelect->isVisible())
charSelect->close();
disconnect(charSelect, SIGNAL(insertSpecialChar()),
More information about the scribus-commit
mailing list