forked from qt-creator/qt-creator
Debugger: Fix setting display format based on type
Change-Id: I5d2b1016d0ad24237abc24233b580049d1c6add0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1867,18 +1867,18 @@ QMenu *WatchModel::createFormatMenu(WatchItem *item)
|
||||
addAction(menu, tr("Change Display for Type \"%1\":").arg(item->type), false);
|
||||
|
||||
addCheckableAction(menu, spacer + tr("Automatic"), true, typeFormat == AutomaticFormat,
|
||||
[this, iname] {
|
||||
[this, item] {
|
||||
//const QModelIndexList active = activeRows();
|
||||
//foreach (const QModelIndex &idx, active)
|
||||
// setModelData(LocalsTypeFormatRole, AutomaticFormat, idx);
|
||||
setTypeFormat(iname, AutomaticFormat);
|
||||
setTypeFormat(item->type, AutomaticFormat);
|
||||
m_engine->updateLocals();
|
||||
});
|
||||
|
||||
for (int format : alternativeFormats) {
|
||||
addCheckableAction(menu, spacer + nameForFormat(format), true, format == typeFormat,
|
||||
[this, act, format, iname] {
|
||||
setTypeFormat(iname, format);
|
||||
[this, act, format, item] {
|
||||
setTypeFormat(item->type, format);
|
||||
m_engine->updateLocals();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user