r15522 by jghali - #6891 : dehyphenating single word resets all hyphenations in linked text frames if word was selected by double click
scribus-commit
scribus-commit at lists.scribus.net
Sun Oct 10 21:45:37 CEST 2010
Author: jghali
Date: Sun Oct 10 19:45:37 2010
New Revision: 15522
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15522
Log:
#6891 : dehyphenating single word resets all hyphenations in linked text frames if word was selected by double click
Modified:
trunk/Scribus/scribus/canvasmode_edit.cpp
trunk/Scribus/scribus/hyphenator.cpp
Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15522&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Sun Oct 10 19:45:37 2010
@@ -418,7 +418,8 @@
else
{ //Double click in a frame to select a word
oldCp = currItem->CPos;
- currItem->CPos = currItem->itemText.selectWord(currItem->CPos);
+ currItem->CPos = currItem->itemText.selectWord(currItem->CPos);
+ currItem->HasSel = (currItem->itemText.lengthOfSelection() > 0);
}
}
else
Modified: trunk/Scribus/scribus/hyphenator.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15522&path=/trunk/Scribus/scribus/hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/hyphenator.cpp (original)
+++ trunk/Scribus/scribus/hyphenator.cpp Sun Oct 10 19:45:37 2010
@@ -193,7 +193,7 @@
QByteArray te;
int startC = 0;
- if (it->HasSel)
+ if (it->itemText.lengthOfSelection() > 0)
{
startC = it->itemText.startOfSelection();
text = it->itemText.text(startC, it->itemText.lengthOfSelection());
@@ -401,7 +401,7 @@
if (!(it->asTextFrame()) || (it ->itemText.length() == 0))
return;
- if (it->HasSel)
+ if (it->itemText.lengthOfSelection() > 0)
{
// int start = it->itemText.startOfSelection();
it->itemText.hyphenateWord(it->itemText.startOfSelection(), it->itemText.lengthOfSelection(), NULL);
More information about the scribus-commit
mailing list