Hide the text or graphics edit control when the user left-clicks

somewhere in the text or graphics window. Previously, those
left-clicks just did nothing.

[git-p4: depot-paths = "//depot/solvespace/": change = 2100]
solver
Jonathan Westhues 2010-01-08 01:55:22 -08:00
parent 0f8c303b2e
commit 5302aad1cc
2 changed files with 12 additions and 2 deletions

View File

@ -762,7 +762,12 @@ bool GraphicsWindow::ConstrainPointByHovered(hEntity pt) {
void GraphicsWindow::MouseLeftDown(double mx, double my) {
orig.mouseDown = true;
if(GraphicsEditControlIsVisible()) return;
if(GraphicsEditControlIsVisible()) {
orig.mouse = Point2d::From(mx, my);
orig.mouseOnButtonDown = orig.mouse;
HideGraphicsEditControl();
return;
}
HideTextEditControl();
if(SS.showToolbar) {

View File

@ -432,7 +432,12 @@ LRESULT CALLBACK TextWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_LBUTTONDOWN:
case WM_MOUSEMOVE: {
if(TextEditControlIsVisible() || GraphicsEditControlIsVisible()) {
SetCursor(LoadCursor(NULL, IDC_ARROW));
if(msg == WM_MOUSEMOVE) {
SetCursor(LoadCursor(NULL, IDC_ARROW));
} else {
HideTextEditControl();
HideGraphicsEditControl();
}
break;
}
GraphicsWindow::Selection ps = SS.GW.hover;