Paning the editor panel with Ctrl +arrows does not work when several work tabs are open

Bug #1333796 reported by Danil Sokolov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Workcraft
Fix Committed
High
Danil Sokolov

Bug Description

How to reproduce:
Create two models so there are two tabs for the corresponding works. Press Ctrl+Up once. Try pressing any Ctrl+arrow key combinations.

Observed behaviour:
The focus gets shifted to the tabs and the editor window does not pan when Ctrl+arrow is pressed.

Expected behaviour:
A viewport of the editor window needs to be movable.

Tags: ui

Related branches

Revision history for this message
Danil Sokolov (danilovesky) wrote :

It looks like the Ctrl+Up (and Ctrl+Down) are used for moving focus in standard look and feel implementation (https://www.jidesoft.com/forum/viewtopic.php?f=18&t=10023)

Either redefine the key mapping or choose a different key combination for panning.

Revision history for this message
Danil Sokolov (danilovesky) wrote :

This can be fixed by redefining input map of GraphEditorPanel.

Add this code to the constructor of GraphEditorPanel:

  this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.CTRL_MASK), "doNothing");
  this.getActionMap().put("doNothing", new AbstractAction() {
   public void actionPerformed(ActionEvent e) {
    //do nothing
   }
  });

Changed in workcraft:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.