Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 444 → Rev 445

/trunk/Scribus/scribus/story.cpp
1634,6 → 1634,8
connect(Editor, SIGNAL(textChanged()), EditorBar, SLOT(doRepaint()));
connect(Editor, SIGNAL(SideBarUp(bool )), EditorBar, SLOT(setRepaint(bool )));
connect(Editor, SIGNAL(SideBarUpdate( )), EditorBar, SLOT(doRepaint()));
// 10/12/2004 - pv - #1203: wrong selection on double click
connect(Editor, SIGNAL(doubleClicked(int, int)), this, SLOT(doubleClick(int, int)));
connect(EditorBar, SIGNAL(ChangeStyle(int, int )), this, SLOT(changeAlignSB(int, int )));
connect(AlignTools, SIGNAL(NewStyle(int)), this, SLOT(newAlign(int)));
connect(AlignTools, SIGNAL(NewAlign(int)), this, SLOT(newAlign(int)));
1647,6 → 1649,25
Editor->setFocus();
}
 
/** 10/12/2004 - pv - #1203: wrong selection on double click
Catch the double click signal - cut the wrong selection (with
whitespaces on the tail) - select only one word - return
controlling back to story editor - have rest */
void StoryEditor::doubleClick(int para, int position)
{
int paraFrom, indexFrom, paraTo, indexTo;
QString selText = Editor->selectedText();
if (selText.length() == 0)
{
updateProps(para, position);
return;
}
Editor->getSelection(&paraFrom, &indexFrom, &paraTo, &indexTo);
selText = selText.stripWhiteSpace();
Editor->setSelection(paraFrom, indexFrom, paraFrom, indexFrom + selText.length());
updateProps(para, position);
}
 
int StoryEditor::exec()
{
clearWFlags( WDestructiveClose );
/trunk/Scribus/scribus/story.h
347,6 → 347,8
void modifiedText();
void LoadTextFile();
void SaveTextFile();
// 10/12/2004 - pv - #1203: wrong selection on double click
void doubleClick(int para, int pos);
 
signals:
void DocChanged();