From 47742d7f90581691e08f7146ef159822d561d15c Mon Sep 17 00:00:00 2001 From: gambas Date: Fri, 28 Jan 2022 23:57:54 +0100 Subject: [PATCH] Correctly read floating point values in CSS. [GB.FORM.HTMLVIEW] * BUG: Correctly read floating point values in CSS. * NEW: Only left mouse button is taken into account by the view when clicking on it. The other buttons are ignored by default. --- .../src/gb.form.htmlview/.src/HtmlView.class | 5 ++--- gb.form.htmlview/src/litehtml/html.cpp | 13 +++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gb.form.htmlview/src/gb.form.htmlview/.src/HtmlView.class b/gb.form.htmlview/src/gb.form.htmlview/.src/HtmlView.class index 896ea4f32..d57a6f79d 100644 --- a/gb.form.htmlview/src/gb.form.htmlview/.src/HtmlView.class +++ b/gb.form.htmlview/src/gb.form.htmlview/.src/HtmlView.class @@ -104,7 +104,7 @@ Public Sub View_MouseDown() $iLastX = Mouse.X $iLastY = Mouse.Y - $hDoc.OnMouseDown(($iLastX + $hView.ScrollX) / $fZoom, ($iLastY + $hView.ScrollY) / $fZoom) + If Mouse.Left Then $hDoc.OnMouseDown(($iLastX + $hView.ScrollX) / $fZoom, ($iLastY + $hView.ScrollY) / $fZoom) End @@ -112,11 +112,10 @@ Public Sub View_MouseUp() $iLastX = Mouse.X $iLastY = Mouse.Y - $hDoc.OnMouseUp(($iLastX + $hView.ScrollX) / $fZoom, ($iLastY + $hView.ScrollY) / $fZoom) + If Mouse.Left Then $hDoc.OnMouseUp(($iLastX + $hView.ScrollX) / $fZoom, ($iLastY + $hView.ScrollY) / $fZoom) End - Public Sub View_Scroll() $hDoc.OnMouseMove(($iLastX + $hView.ScrollX) / $fZoom, ($iLastY + $hView.ScrollY) / $fZoom) diff --git a/gb.form.htmlview/src/litehtml/html.cpp b/gb.form.htmlview/src/litehtml/html.cpp index 15e3894b1..76bf7613e 100644 --- a/gb.form.htmlview/src/litehtml/html.cpp +++ b/gb.form.htmlview/src/litehtml/html.cpp @@ -180,16 +180,17 @@ double litehtml::strtod(const char *nptr, char **endptr) p = nptr; - if (*p == '+') - { - neg = false; - p++; - } - else if (*p == '-') + if (*p == '-') { neg = true; p++; } + else + { + neg = false; + if (*p == '+') + p++; + } while (*p) {