Thu, 15 Jul 2021 17:11:43 +0300
* AdvancedText regions in single line was not working
* Fixed a crash in markdown label
Source/Gorgon/Graphics/AdvancedPrinterImpl.h | file | annotate | diff | comparison | revisions | |
Source/Gorgon/Widgets/Label.cpp | file | annotate | diff | comparison | revisions |
--- a/Source/Gorgon/Graphics/AdvancedPrinterImpl.h Thu Jul 15 12:50:41 2021 +0300 +++ b/Source/Gorgon/Graphics/AdvancedPrinterImpl.h Thu Jul 15 17:11:43 2021 +0300 @@ -932,6 +932,7 @@ ind = acc.size(); newline = ind == 0; + int regionendy = cur.Y + lineh; if(nl != -1) cur.Y += lineh; @@ -948,7 +949,7 @@ r.startat = -1; } - r.Bounds.Bottom = cur.Y; + r.Bounds.Bottom = regionendy; r.Bounds.Top = starty; if(r.finishat != -1 && r.finishat <= end) { @@ -965,7 +966,7 @@ regions.push_back(r); r.Bounds.Left = nextlinexstart; - r.Bounds.Top = cur.Y; + r.Bounds.Top = regionendy; if(r.finishat != -1) { r.finishat -= end;
--- a/Source/Gorgon/Widgets/Label.cpp Thu Jul 15 12:50:41 2021 +0300 +++ b/Source/Gorgon/Widgets/Label.cpp Thu Jul 15 17:11:43 2021 +0300 @@ -118,7 +118,7 @@ if(links.size() > r.ID) { auto &dest = links[r.ID].Destination; if(dest.substr(0, 1) == "#") { - if(!inpagehandler || !inpagehandler(dest)) + if((!inpagehandler || !inpagehandler(dest)) && UI::InPageHandler) UI::InPageHandler(dest); } else {