Fixed issue #553. Tape.exe crash. Issue with the Search field.
--HG-- branch : release
This commit is contained in:
parent
691da0ed3e
commit
ed122a11c2
|
@ -19,6 +19,7 @@
|
||||||
- [#543] Detail loses details.
|
- [#543] Detail loses details.
|
||||||
- [#548] Bug Detail tool. Case when seam allowance is wrong.
|
- [#548] Bug Detail tool. Case when seam allowance is wrong.
|
||||||
- Called the main app in console mode doesn't show opening file error in some cases.
|
- Called the main app in console mode doesn't show opening file error in some cases.
|
||||||
|
- [#553] Tape.exe crash. Issue with the Search field.
|
||||||
|
|
||||||
# Version 0.4.4 April 12, 2016
|
# Version 0.4.4 April 12, 2016
|
||||||
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.
|
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.
|
||||||
|
|
|
@ -42,7 +42,11 @@ void VTableSearch::Clear()
|
||||||
{
|
{
|
||||||
SCASSERT(table != nullptr);
|
SCASSERT(table != nullptr);
|
||||||
|
|
||||||
foreach(QTableWidgetItem *item, searchList)
|
for(int i = 0; i < table->rowCount(); ++i)
|
||||||
|
{
|
||||||
|
for(int j = 0; j < table->columnCount(); ++j)
|
||||||
|
{
|
||||||
|
if (QTableWidgetItem *item = table->item(i, j))
|
||||||
{
|
{
|
||||||
if (item->row() % 2 != 0 && table->alternatingRowColors())
|
if (item->row() % 2 != 0 && table->alternatingRowColors())
|
||||||
{
|
{
|
||||||
|
@ -53,6 +57,10 @@ void VTableSearch::Clear()
|
||||||
item->setBackground(QPalette().base());
|
item->setBackground(QPalette().base());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
searchList.clear();
|
||||||
searchIndex = -1;
|
searchIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,17 +88,14 @@ void VTableSearch::Find(const QString &term)
|
||||||
{
|
{
|
||||||
SCASSERT(table != nullptr);
|
SCASSERT(table != nullptr);
|
||||||
|
|
||||||
const QList<QTableWidgetItem *> list = table->findItems(term, Qt::MatchContains);
|
|
||||||
|
|
||||||
if (list.isEmpty() || term.isEmpty())
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Clear();
|
Clear();
|
||||||
|
|
||||||
searchList = list;
|
if (not term.isEmpty())
|
||||||
|
{
|
||||||
|
searchList = table->findItems(term, Qt::MatchContains);
|
||||||
|
|
||||||
|
if (not searchList.isEmpty())
|
||||||
|
{
|
||||||
foreach(QTableWidgetItem *item, searchList)
|
foreach(QTableWidgetItem *item, searchList)
|
||||||
{
|
{
|
||||||
item->setBackground(Qt::yellow);
|
item->setBackground(Qt::yellow);
|
||||||
|
@ -101,6 +106,7 @@ void VTableSearch::Find(const QString &term)
|
||||||
item->setBackground(Qt::red);
|
item->setBackground(Qt::red);
|
||||||
table->scrollToItem(item);
|
table->scrollToItem(item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user