Skip to content

Commit

Permalink
Version 1.7.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
svenhb authored May 20, 2024
1 parent 7d9a9fd commit 7256592
Show file tree
Hide file tree
Showing 24 changed files with 21,302 additions and 20,309 deletions.
346 changes: 173 additions & 173 deletions GRBL-Plotter/MachineControl/ControlProjector.Designer.cs

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions GRBL-Plotter/MachineControl/ControlProjector.cs
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
Expand All @@ -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
*/


Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 7256592

Please sign in to comment.