Changeset 13763


Ignore:
Timestamp:
04/14/16 14:30:23 (6 years ago)
Author:
jkarder
Message:

#1265: worked on visualization

  • added null check for shortcut actions
Location:
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs

    r13762 r13763  
    229229          if (e.KeyCode == shortcut.Key && e.Modifiers == shortcut.Modifiers) {
    230230            ActiveShortcut = shortcut;
    231             shortcut.DownAction();
     231            var downAction = shortcut.DownAction;
     232            if (downAction != null) downAction();
    232233            break;
    233234          }
     
    247248
    248249        if (ActiveShortcut.Key == e.KeyCode || ActiveShortcut.GetModifiers().Except(modifiers).Any()) {
    249           ActiveShortcut.UpAction();
     250          var upAction = ActiveShortcut.UpAction;
     251          if (upAction != null) upAction();
    250252          ActiveShortcut = null;
    251253        }
  • branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartMode.cs

    r13762 r13763  
    8686        if (e.KeyCode == shortcut.Key && e.Modifiers == shortcut.Modifiers) {
    8787          activeShortcut = shortcut;
    88           shortcut.DownAction();
     88          var downAction = shortcut.DownAction;
     89          if (downAction != null) downAction();
    8990          break;
    9091        }
     
    100101
    101102      if (activeShortcut.Key == e.KeyCode || activeShortcut.GetModifiers().Except(modifiers).Any()) {
    102         activeShortcut.UpAction();
     103        var upAction = activeShortcut.UpAction;
     104        if (upAction != null) upAction();
    103105        activeShortcut = null;
    104106      }
Note: See TracChangeset for help on using the changeset viewer.