From 6cfa884406f9628575dffd36297be75cfaaf90c2 Mon Sep 17 00:00:00 2001 From: Andrew Downing Date: Thu, 26 Feb 2015 12:22:42 -0500 Subject: [PATCH] fix GraphicsEditControlWindow placement, and fix error due to cmath being included instead of math.h --- src/dsc.h | 3 ++- src/fltk/fltkmain.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dsc.h b/src/dsc.h index cd72f81..b7c328a 100644 --- a/src/dsc.h +++ b/src/dsc.h @@ -7,7 +7,8 @@ #ifndef __DSC_H #define __DSC_H -#include +#include + #include "solvespace.h" class Vector; diff --git a/src/fltk/fltkmain.cpp b/src/fltk/fltkmain.cpp index 6120c27..937dbc7 100644 --- a/src/fltk/fltkmain.cpp +++ b/src/fltk/fltkmain.cpp @@ -748,8 +748,8 @@ void ShowGraphicsEditControl(int x, int y, char *s) // Convert to ij (vs. xy) style coordinates, // and compensate for the input widget height due to inverse coord - x = x + GraphicsGlWnd->w()/2; - y = -y + GraphicsGlWnd->h()/2 - GraphicsEditControlWindow->h(); + x = x + GraphicsGlWnd->w()/2 + GraphicsWnd->x(); + y = -y + GraphicsGlWnd->h()/2 - GraphicsEditControlWindow->h() + GraphicsWnd->y(); GraphicsEditControlWindow->position(x, y); GraphicsEditControl->value(s);