Skip to content

Commit

Permalink
while selecting and adding line, do not zoom with the mouse drag
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmipt committed Nov 17, 2024
1 parent 4a95bb6 commit f330ed2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/studio/ui/chart/ChartPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ public void mousePressed(MouseEvent e) {
if (chart == null) {
return;
}
if (selectedLine != null) return;

if (addingLine) {
addLine(e);
return;
}
Plot plot = chart.getPlot();
int mods = e.getModifiers();
if ((mods & this.panMask) == this.panMask) {
Expand Down Expand Up @@ -337,12 +343,6 @@ else if (e.isPopupTrigger()) {

}

@Override
public void mouseClicked(MouseEvent event) {
if (addingLine) addLine(event);
super.mouseClicked(event);
}

private void addLineAction() {
addingLine = true;
}
Expand Down

0 comments on commit f330ed2

Please sign in to comment.