Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: solvespace/solvespace
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: df6777aaf392
Choose a base ref
...
head repository: solvespace/solvespace
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6c167db60279
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on May 24, 2019

  1. Add an explicit mirror checkbox for Paste Transformed.

    This has always been possible by using negative scale, so this just
    adds a checkbox controlling the sign.
    whitequark committed May 24, 2019
    Copy the full SHA
    6c167db View commit details
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/clipboard.cpp
13 changes: 10 additions & 3 deletions src/clipboard.cpp
Original file line number Diff line number Diff line change
@@ -349,7 +349,7 @@ bool TextWindow::EditControlDoneForPaste(const std::string &s) {
e = Expr::From(s, /*popUpError=*/true);
double v = e->Eval();
if(fabs(v) > 1e-6) {
shown.paste.scale = v;
shown.paste.scale = shown.paste.scale < 0 ? -v : v;
} else {
Error(_("Scale cannot be zero."));
}
@@ -375,9 +375,13 @@ void TextWindow::ScreenChangePasteTransformed(int link, uint32_t v) {
break;

case 's':
SS.TW.ShowEditControl(13, ssprintf("%.3f", SS.TW.shown.paste.scale));
SS.TW.ShowEditControl(13, ssprintf("%.3f", fabs(SS.TW.shown.paste.scale)));
SS.TW.edit.meaning = Edit::PASTE_SCALE;
break;

case 'f':
SS.TW.shown.paste.scale *= -1;
break;
}
}

@@ -466,8 +470,11 @@ void TextWindow::ShowPasteTransformed() {
SS.MmToString(shown.paste.trans.z).c_str(),
&ScreenPasteTransformed);
Printf(false, "%Ba %Ftscale%E %@ %Fl%Ls%f[change]%E",
shown.paste.scale,
fabs(shown.paste.scale),
&ScreenChangePasteTransformed);
Printf(false, "%Ba %Ftmirror%E %Fd%Lf%f%s flip%E",
&ScreenChangePasteTransformed,
shown.paste.scale < 0 ? CHECK_TRUE : CHECK_FALSE);

Printf(true, " %Fl%Lg%fpaste transformed now%E", &ScreenPasteTransformed);