Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/widgets/register.cpp
Show First 20 Lines • Show All 1056 Lines • ▼ Show 20 Line(s) | |||||
1057 | 1057 | | |||
1058 | void Register::resize() | 1058 | void Register::resize() | ||
1059 | { | 1059 | { | ||
1060 | resize(DetailColumn); | 1060 | resize(DetailColumn); | ||
1061 | } | 1061 | } | ||
1062 | 1062 | | |||
1063 | void Register::resize(int col, bool force) | 1063 | void Register::resize(int col, bool force) | ||
1064 | { | 1064 | { | ||
1065 | if (m_needResize) | ||||
1066 | m_minimalColumnWidthCache.clear(); | ||||
1067 | | ||||
1065 | if (!m_needResize && !force) | 1068 | if (!m_needResize && !force) | ||
1066 | return; | 1069 | return; | ||
1067 | 1070 | | |||
1068 | m_needResize = false; | 1071 | m_needResize = false; | ||
1069 | 1072 | | |||
1070 | // resize the register | 1073 | // resize the register | ||
1071 | int w = viewport()->width(); | 1074 | int w = viewport()->width(); | ||
1072 | 1075 | | |||
▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Line(s) | 1200 | #else | |||
1240 | } | 1243 | } | ||
1241 | 1244 | | |||
1242 | return w; | 1245 | return w; | ||
1243 | #endif | 1246 | #endif | ||
1244 | } | 1247 | } | ||
1245 | 1248 | | |||
1246 | void Register::adjustColumn(int col) | 1249 | void Register::adjustColumn(int col) | ||
1247 | { | 1250 | { | ||
1248 | setColumnWidth(col, minimumColumnWidth(col)); | 1251 | QMap<int, int>::const_iterator it = m_minimalColumnWidthCache.find(col); | ||
1252 | int width = 0; | ||||
1253 | if (it == m_minimalColumnWidthCache.end()) { | ||||
1254 | width = minimumColumnWidth(col); | ||||
1255 | m_minimalColumnWidthCache[col] = width; | ||||
1256 | } else { | ||||
1257 | width = it.value(); | ||||
1258 | } | ||||
1259 | setColumnWidth(col, width); | ||||
1249 | } | 1260 | } | ||
1250 | 1261 | | |||
1251 | void Register::clearSelection() | 1262 | void Register::clearSelection() | ||
1252 | { | 1263 | { | ||
1253 | unselectItems(); | 1264 | unselectItems(); | ||
1254 | TransactionEditorContainer::clearSelection(); | 1265 | TransactionEditorContainer::clearSelection(); | ||
1255 | } | 1266 | } | ||
1256 | 1267 | | |||
▲ Show 20 Lines • Show All 873 Lines • Show Last 20 Lines |