- ITF14/DPLEIT/DPIDENT: ignore option_2 (check digit options)

- GUI: scalewindow: fix cropping resolution on initial setup
  (`spnResolution` max 1000 -> 254000) and bound X-dim to <= 10 in
  `set_maxima()`
- GUI: mainwindow: bound X-dim as above and clamp `m_xdimdpVars`
  members on initial load from INI
- GUI: undo `QString::mid()` -> `QString::midRef()` from clazy
  & explicitly include "QObject" in "qzint.h" (not Qt6 compatible)
This commit is contained in:
gitlost 2024-01-25 00:10:34 +00:00
parent 7c1bdba8ae
commit 7b41dfbee2
10 changed files with 58 additions and 43 deletions

View file

@ -150,7 +150,7 @@ void ScaleWindow::size_msg_ui_set()
void ScaleWindow::unset_scale()
{
m_vars.x_dim = m_bc->bc.getXdimDpFromScale(m_originalScale, get_dpmm(), getFileType());
m_vars.x_dim = std::min(m_bc->bc.getXdimDpFromScale(m_originalScale, get_dpmm(), getFileType()), 10.0f);
m_vars.set = 0;
if (cmbXdimUnits->currentIndex() == 1) { // Inches
@ -252,7 +252,7 @@ const char *ScaleWindow::getFileType() const
void ScaleWindow::set_maxima()
{
float maxXdim = m_bc->bc.getXdimDpFromScale(200.0f, get_dpmm(), getFileType());
float maxXdim = std::min(m_bc->bc.getXdimDpFromScale(200.0f, get_dpmm(), getFileType()), 10.0f);
if (cmbXdimUnits->currentIndex() == 1) { // Inches
spnXdim->setMaximum(maxXdim / 25.4);
} else {