Merged in SP-263_recenter_on_spacebar (pull request #371)

RTM - SP-263 recenter on spacebar

Approved-by: Eric Harding <eric.harding@bluetradesys.com>
This commit is contained in:
Jake Norbut committed 2019-11-18 15:35:59 +00:00
commit 818806a4e1
2 files changed
+5 -2

No files matched your search

@@ -449,6 +449,9 @@ namespace mbts.spark {
public void key_down(KeyEventArgs e) {
if (order_properties_vm == null)
return;
if (KeyboardExtensions.IsDown(Key.Space)) {
_bus?.post(SparkTags.RequestRecenterLadder, null);
}
// the ctrl modifier requirement helps avoid keyboard-input collisions w/ algo-templates popup
if (!KeyboardExtensions.IsCtrlDown()) return;
var new_algo = order_properties_vm.algo_definitions.FirstOrDefault(o => o.algo_root.key_match(e));
+2 -2
View File
@@ -102,14 +102,14 @@ namespace mbts.utils
string identifier = ((felem.Name != null) && (felem.Name.Length > 0)) ?
felem.Name :
felem.GetType().ToString();
return "$FrameworkElement [{identifier}]";
return $"FrameworkElement [{identifier}]";
} else {
// Maybe a FrameworkContentElement has focus
if (elem is FrameworkContentElement fcelem) {
string identifier = ((fcelem.Name != null) && (fcelem.Name.Length > 0)) ?
fcelem.Name :
fcelem.GetType().ToString();
return "$FrameworkContentElement [{identifier}]";
return $"FrameworkContentElement [{identifier}]";
}
return $"Element of type [{elem.GetType().ToString()}] has focus";
}