Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public class OpenDisplayAction extends ActionInfoBase {
/**
* Default {@link Target} is new tab.
*/
private Target target = Target.TAB;
private Target target = Target.REPLACE;
private Target modifierTarget = null;

private Macros macros;

Expand Down Expand Up @@ -116,7 +117,7 @@ public OpenDisplayAction(final String description, final String file, final Macr
}

public Target getTarget() {
return target;
return modifierTarget != null ? modifierTarget : target;
}

public Macros getMacros() {
Expand Down Expand Up @@ -197,10 +198,14 @@ public void writeToXML(ModelWriter modelWriter, XMLStreamWriter writer) throws E
@Override
public void setModifiers(final MouseEvent event) {
boolean middle_click = event.isMiddleButtonDown();
if (event.isShortcutDown() || middle_click) {
target = Target.TAB;
} else if (event.isShiftDown()) {
target = Target.WINDOW;
if (event.isShiftDown() && event.isShortcutDown()) {
modifierTarget = Target.STANDALONE;
} else if (event.isShortcutDown()) {
modifierTarget = Target.TAB;
} else if (event.isShiftDown() || middle_click) {
modifierTarget = Target.WINDOW;
} else {
modifierTarget = null;
}
}

Expand Down