mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user