CMP_TREE_MODEL_ADAPTER: use more suitable cache type
Fixes: lp:1671086 * https://bugs.launchpad.net/kicad/+bug/1671086
This commit is contained in:
parent
2232edfb87
commit
3bddc14dc6
|
@ -353,8 +353,8 @@ int CMP_TREE_MODEL_ADAPTER::WidthFor( CMP_TREE_NODE& aNode, int aCol )
|
|||
int wname = m_widget->GetTextExtent( aNode.Name ).x + kDataViewIndent;
|
||||
int wdesc = m_widget->GetTextExtent( aNode.Desc ).x;
|
||||
|
||||
m_width_cache[&aNode][0] = wname;
|
||||
m_width_cache[&aNode][1] = wdesc;
|
||||
m_width_cache[&aNode].push_back( wname );
|
||||
m_width_cache[&aNode].push_back( wdesc );
|
||||
return m_width_cache[&aNode][aCol];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -315,7 +315,7 @@ private:
|
|||
wxDataViewColumn* m_col_desc;
|
||||
wxDataViewCtrl* m_widget;
|
||||
|
||||
typedef std::unordered_map<CMP_TREE_NODE*, int[2]> WIDTH_CACHE;
|
||||
typedef std::unordered_map<CMP_TREE_NODE*, std::vector<int>> WIDTH_CACHE;
|
||||
|
||||
static WIDTH_CACHE m_width_cache;
|
||||
|
||||
|
|
Loading…
Reference in New Issue