mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 09:40:52 +01:00
CR characters in elements and TBT extra information field are now stripped.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1641 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -940,7 +940,7 @@ void ElementScene::slot_editAuthorInformations() {
|
|||||||
|
|
||||||
// lance le dialogue
|
// lance le dialogue
|
||||||
if (dialog_author.exec() == QDialog::Accepted && !is_read_only) {
|
if (dialog_author.exec() == QDialog::Accepted && !is_read_only) {
|
||||||
QString new_infos = text_field -> toPlainText();
|
QString new_infos = text_field -> toPlainText().remove(QChar(13)); // CR-less text
|
||||||
if (new_infos != informations()) {
|
if (new_infos != informations()) {
|
||||||
undoStack().push(new ChangeInformationsCommand(this, informations(), new_infos));
|
undoStack().push(new ChangeInformationsCommand(this, informations(), new_infos));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -875,7 +875,7 @@ void QETTitleBlockTemplateEditor::editTemplateInformation() {
|
|||||||
|
|
||||||
// run the dialog
|
// run the dialog
|
||||||
if (dialog_author.exec() == QDialog::Accepted && !read_only_) {
|
if (dialog_author.exec() == QDialog::Accepted && !read_only_) {
|
||||||
QString new_info = text_field -> toPlainText();
|
QString new_info = text_field -> toPlainText().remove(QChar(13)); // CR-less text
|
||||||
if (new_info != tb_template_ -> information()) {
|
if (new_info != tb_template_ -> information()) {
|
||||||
pushUndoCommand(new ChangeTemplateInformationsCommand(tb_template_, tb_template_ -> information(), new_info));
|
pushUndoCommand(new ChangeTemplateInformationsCommand(tb_template_, tb_template_ -> information(), new_info));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user