-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
21,302 additions
and
20,309 deletions.
There are no files selected for viewing
346 changes: 173 additions & 173 deletions
346
GRBL-Plotter/MachineControl/ControlProjector.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* GRBL-Plotter. Another GCode sender for GRBL. | ||
This file is part of the GRBL-Plotter application. | ||
Copyright (C) 2015-2022 Sven Hasemann contact: [email protected] | ||
Copyright (C) 2015-2024 Sven Hasemann contact: [email protected] | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
|
@@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License | |
/* | ||
* 2022-03-25 New form to be displayed with a projector on the work-piece | ||
* 2022-04-06 Add buttons to minimize / maximize windows, monitor selection | ||
* 2024-05-02 l:230 f:BtnProjectorCalc_Click check min/max before setting new NudScaling.Value | ||
*/ | ||
|
||
|
||
|
@@ -226,8 +227,12 @@ private void BtnMaximize_Click(object sender, EventArgs e) | |
private void BtnProjectorCalc_Click(object sender, EventArgs e) | ||
{ | ||
decimal scaling = NudProjectorSet.Value / NudProjectorReal.Value; | ||
NudScaling.Value *= scaling; | ||
NudProjectorReal.Value = NudProjectorSet.Value; | ||
decimal newScaling = NudScaling.Value * scaling; | ||
if ((newScaling >= NudScaling.Minimum) && (newScaling <= NudScaling.Maximum)) | ||
{ | ||
NudScaling.Value = newScaling; | ||
NudProjectorReal.Value = NudProjectorSet.Value; | ||
} | ||
} | ||
|
||
private void CbProjectorScaleEnable_CheckedChanged(object sender, EventArgs e) | ||
|
Oops, something went wrong.