check root algo's can_expand to see if we should draw Cursor.No
This commit is contained in:
1 parent
7e47d7f8a5
commit
7e75a71898
1 file changed
+5
-2
@@ -150,10 +150,13 @@ namespace mbts.spark {
|
||||
|
||||
void _host_PreviewMouseDown(object sender, MouseButtonEventArgs e) {
|
||||
// If we middle click over bid or ask columns then change the mouse
|
||||
// cursor to illustrate sending an order is not applicable
|
||||
// cursor to illustrate sending an order is not applicable when the
|
||||
// selected algo in the left pane's algo root has no additional properties
|
||||
var pos = e.GetPosition(_host);
|
||||
if (e.MiddleButton == MouseButtonState.Pressed &&
|
||||
(_host._column_for_point(pos).column_type == LadderGridHost.ColumnType.Bid || _host._column_for_point(pos).column_type == LadderGridHost.ColumnType.Ask)) {
|
||||
(_host._column_for_point(pos).column_type == LadderGridHost.ColumnType.Bid || _host._column_for_point(pos).column_type == LadderGridHost.ColumnType.Ask) &&
|
||||
!(_host._vm.order_properties_vm?.selected_algo_definition?.algo_root?.can_expand ?? true)
|
||||
) {
|
||||
_host.Cursor = Cursors.No;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user