ladder - don't show 0 (size) on mouse over
This commit is contained in:
1 parent
d19c6894b6
commit
1692d0c7c7
1 file changed
+5
-4
@@ -127,8 +127,8 @@ namespace mbts.spark {
|
||||
protected override async void OnMouseDown(MouseButtonEventArgs e) {
|
||||
Keyboard.ClearFocus();
|
||||
Focus();
|
||||
if(e.ChangedButton == MouseButton.Middle && e.ButtonState == MouseButtonState.Pressed)
|
||||
_scroll_to_center();
|
||||
if (e.ChangedButton == MouseButton.Middle && e.ButtonState == MouseButtonState.Pressed)
|
||||
_scroll_to_center();
|
||||
else if (_settings != null && !_tactile_adorner.is_resizing_column) {
|
||||
var point = e.GetPosition(this);
|
||||
var price = price_for_point(point);
|
||||
@@ -164,8 +164,9 @@ namespace mbts.spark {
|
||||
}
|
||||
|
||||
static ushort? _size_from_price(double price, NativePriceSize[] depth, ContractSpecificationImmutable spec) {
|
||||
if (double.IsNaN(price)) return null;
|
||||
else return depth.FirstOrDefault(nps => spec.tick_equals(price, nps.price), nps => nps.size);
|
||||
if (!double.IsNaN(price) && depth.TryGetFirst(nps => spec.tick_equals(price, nps.price), out NativePriceSize result))
|
||||
return result.size;
|
||||
return null;
|
||||
}
|
||||
|
||||
int _row_for_point(Point point) {
|
||||
|
||||
Reference in new issue
Block a user