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: 02a9a1b925c3
Choose a base ref
...
head repository: solvespace/solvespace
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b3f739f2c4f7
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Jul 12, 2019

  1. Copy the full SHA
    b3f739f View commit details
Showing with 7 additions and 0 deletions.
  1. +5 −0 src/drawentity.cpp
  2. +1 −0 src/toolbar.cpp
  3. +1 −0 test/harness.cpp
5 changes: 5 additions & 0 deletions src/drawentity.cpp
Original file line number Diff line number Diff line change
@@ -587,6 +587,11 @@ void Entity::Draw(DrawAs how, Canvas *canvas) {
double s = camera.scale;
double h = 60 - camera.height / 2.0;
double w = 60 - camera.width / 2.0;
// Shift the axis to the right if they would overlap with the toolbar.
if(SS.showToolbar) {
if(h + 30 > -(34*16 + 3*16 + 8) / 2)
w += 60;
}
tail = camera.projRight.ScaledBy(w/s).Plus(
camera.projUp. ScaledBy(h/s)).Minus(camera.offset);
} else {
1 change: 1 addition & 0 deletions src/toolbar.cpp
Original file line number Diff line number Diff line change
@@ -151,6 +151,7 @@ bool GraphicsWindow::ToolbarDrawOrHitTest(int mx, int my, UiCanvas *canvas,

int x = 17, y = (int)(height - 52);

// When changing these values, also change the asReference drawing code in drawentity.cpp.
int fudge = 8;
int h = 34*16 + 3*16 + fudge;
int aleft = 0, aright = 66, atop = y+16+fudge/2, abot = y+16-h;
1 change: 1 addition & 0 deletions test/harness.cpp
Original file line number Diff line number Diff line change
@@ -363,6 +363,7 @@ int main(int argc, char **argv) {
}

SS.Init();
SS.showToolbar = false;
SS.checkClosedContour = false;

Test::Helper helper = {};