Search and replace : improve the search for elements.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5662 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-12-26 20:32:11 +00:00
parent 0e60c95513
commit d45c070e16
2 changed files with 22 additions and 1 deletions

View File

@@ -29,6 +29,8 @@
#include "qetapp.h"
#include "replaceconductordialog.h"
#include "replaceadvanceddialog.h"
#include "dynamicelementtextitem.h"
#include "elementtextitemgroup.h"
#include <QSettings>
@@ -761,6 +763,23 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element)
}
}
for (DynamicElementTextItem *deti : element->dynamicTextItems())
{
if (deti->textFrom() == DynamicElementTextItem::UserText || deti->textFrom() == DynamicElementTextItem::CompositeText) {
list.append(deti->toPlainText());
}
}
for (ElementTextItemGroup *group : element->textGroups())
{
list.append(group->name());
for (DynamicElementTextItem *deti : group->texts()) {
if (deti->textFrom() == DynamicElementTextItem::UserText || deti->textFrom() == DynamicElementTextItem::CompositeText) {
list.append(deti->toPlainText());
}
}
}
return list;
}