From 4d1d51596f53b2743573142c78b72753a5a1d152 Mon Sep 17 00:00:00 2001 From: anurag Date: Sun, 16 Aug 2020 16:24:23 +0530 Subject: [PATCH] Correct some fractal url --- src/ui/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/main.cpp b/src/ui/main.cpp index bec4d64e..9631e972 100644 --- a/src/ui/main.cpp +++ b/src/ui/main.cpp @@ -280,17 +280,19 @@ static void ui_download(struct uih_context */*uih*/) static void ui_fractalinfo(struct uih_context *uih) { - printf("%s", uih->fcontext->currentformula->shortname); QString fractalname = uih->fcontext->currentformula->shortname; + bool higherpower = false; for (auto c : fractalname) { if(c >= '0' and c <= '9') { fractalname.remove(c); + higherpower = true; } } QMap map; // Dictionary of fractaltype and corresponding wiki hypertext link - map["mandel"] = "mandelbrot"; + map["mandel"] = higherpower ? "higher-power-mandelbrots" : "mandelbrot"; + map["octal"] = "octo"; fractalname = map.find(fractalname) != map.end() ? map[fractalname] : fractalname; QDesktopServices::openUrl(QUrl(FRACTALINFO_URL + fractalname));