[scribus-dev] Fix for broken hyphenation language selection

Mikko Rasa tdb at tdb.fi
Sun Oct 25 12:29:50 UTC 2015


I discovered a problem in Scribus 1.4.5 where the hyphenation language 
from the document isn't used after the document is loaded.  This is 
because ScribusMainWindow::loadDoc calls doc->setGUI - which creates the 
hyphenator - before the document is loaded.  At that stage the language 
will default to the global settings.  Furthermore, FileLoader::postLoad 
resets the hyphenator language to the document language *without 
reloading the dict*, leaving the hyphenator in an inconsistent state.

As for why my global setting was incorrect, I got a new computer a while 
back and due to Debian's packaging didn't have the correct hyphen dicts 
installed at first.  I'm guessing the global setting has some kind of 
fallback in case the stored language isn't found on application startup, 
but I didn't delve into it.

The attached patch fixes the document language problem by moving 
hyphenator creation to a later stage, after the language has been set 
up.  I also took the liberty of removing the offending block of code in 
the beginning of postLoad since it seems redundant now.

-- 
Mikko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_hyphen_language.patch
Type: text/x-diff
Size: 2729 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20151025/c43c4bc5/attachment.bin>


More information about the scribus-dev mailing list