}
else
{
- result = NotifySelect(master, this,
- currentRow ? currentRow : null, mods);
+ DataField f = null;
if(result && style.alwaysEdit && currentRow)
{
if(newCurrentRow)
if(!field.prev) width -= indent;
if(x >= sx && x < sx + width)
{
- currentField = field;
+ f = currentField = field;
break;
}
sx += width;
}
}
- currentRow.Edit(currentField);
+ }
+ // Moved NotifySelect after setting currentField for the NotifySelect implementation to be aware of which field is now selected (e.g. WatchesView)
+ result = NotifySelect(master, this, currentRow, mods);
+ if(result && style.alwaysEdit && currentRow)
+ {
+ // In case the user specifically clicked on a field (f is set), override any change to currentField that NotifySelect could have done
+ currentRow.Edit(f ? f : currentField);
// If the user clicked exactly on the edited field,
// activate it
}
return true;
}
+
+ bool NotifySelect(ListBox listBox, DataRow row, Modifiers mods)
+ {
+ if(listBox.currentField != expressionField)
+ listBox.currentField = expressionField;
+ return true;
+ }
};
DataField expressionField { "char *", true, width = 130, header = $"Expression" };
DataField typeField { "Type", false, width = 180, header = $"Type" };