mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-15 17:25:53 +00:00
Infinite-recursion avoidance
This commit is contained in:
parent
04a182d5bb
commit
796e6193ad
@ -110,6 +110,7 @@ class Table : public View
|
||||
} m_rowsView;
|
||||
|
||||
bool m_headerNeedsUpdate = false;
|
||||
bool m_inSelectRow = false;
|
||||
|
||||
public:
|
||||
Table(ViewResources& res, View& parentView, ITableDataBinding* data,
|
||||
|
@ -240,13 +240,19 @@ void Table::cycleSortColumn(size_t c)
|
||||
|
||||
void Table::selectRow(size_t r)
|
||||
{
|
||||
if (m_inSelectRow)
|
||||
return;
|
||||
if (r >= m_rows && r != -1)
|
||||
Log.report(LogVisor::FatalError, "selectRow out of bounds (%" PRISize ", %" PRISize ")",
|
||||
r, m_rows);
|
||||
if (r == m_selectedRow)
|
||||
{
|
||||
if (m_state)
|
||||
{
|
||||
m_inSelectRow = true;
|
||||
m_state->setSelectedRow(r);
|
||||
m_inSelectRow = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (m_selectedRow != -1)
|
||||
@ -266,7 +272,11 @@ void Table::selectRow(size_t r)
|
||||
}
|
||||
updateSize();
|
||||
if (m_state)
|
||||
{
|
||||
m_inSelectRow = true;
|
||||
m_state->setSelectedRow(r);
|
||||
m_inSelectRow = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Table::setMultiplyColor(const Zeus::CColor& color)
|
||||
|
Loading…
x
Reference in New Issue
Block a user