Sat, 17 Aug 2013 11:48:27 +0300
ask the user for isecalc's path if adding edges to intersector output and no path is defined
changelog.txt | file | annotate | diff | comparison | revisions | |
src/extprogs.cpp | file | annotate | diff | comparison | revisions |
--- a/changelog.txt Sat Aug 17 11:37:51 2013 +0300 +++ b/changelog.txt Sat Aug 17 11:48:27 2013 +0300 @@ -17,6 +17,8 @@ syntax ('0 BFC CERTIFY CLIP'). - When an external program is attempted to be used without a binary path defined, one will be asked with an input dialog instead of being told to go to configuration to set the path. +- When adding edges with Intersector (which is done with Isecalc), the user is prompted for Isecalc's + path now as well if necessary instead of just ignoring it and not adding the edgelines. - If the vertex snapper finds a vertex closer than 4 pixels, it likely is the vertex being looked for and the algorithm can terminate early, hopefully this will save a few cycles on large parts. - The camera icons now draw real tooltips instead of emulated ones.
--- a/src/extprogs.cpp Sat Aug 17 11:37:51 2013 +0300 +++ b/src/extprogs.cpp Sat Aug 17 11:48:27 2013 +0300 @@ -94,13 +94,15 @@ }; // ============================================================================= -static bool checkProgPath (str path, const extprog prog) { +static bool checkProgPath (const extprog prog) { + alias path = g_extProgPaths[prog]->value; + if (path.length() > 0) return true; ExtProgPathPrompt* dlg = new ExtProgPathPrompt (g_extProgNames[prog]); if (dlg->exec() && !dlg->getPath().isEmpty()) { - *g_extProgPaths[prog] = dlg->getPath(); + path = dlg->getPath(); return true; } @@ -288,7 +290,7 @@ DEFINE_ACTION (Ytruder, 0) { setlocale (LC_ALL, "C"); - if (!checkProgPath (prog_ytruder, Ytruder)) + if (!checkProgPath (Ytruder)) return; QDialog* dlg = new QDialog; @@ -344,7 +346,7 @@ DEFINE_ACTION (Rectifier, 0){ setlocale (LC_ALL, "C"); - if (!checkProgPath (prog_rectifier, Rectifier)) + if (!checkProgPath (Rectifier)) return; QDialog* dlg = new QDialog; @@ -394,7 +396,7 @@ DEFINE_ACTION (Intersector, 0) { setlocale (LC_ALL, "C"); - if (!checkProgPath (prog_intersector, Intersector)) + if (!checkProgPath (Intersector)) return; QDialog* dlg = new QDialog; @@ -472,11 +474,12 @@ if (repeatInverse && runUtilityProcess (Intersector, prog_intersector, argv_inverse)) insertOutput (outDAT2Name, false, {cutCol}); - if (ui.cb_edges->isChecked() && runUtilityProcess (Isecalc, prog_isecalc, - join ({inDATName, cutDATName, edgesDATName}))) - { + if ( + ui.cb_edges->isChecked() && + checkProgPath (Isecalc) && + runUtilityProcess (Isecalc, prog_isecalc, join ({inDATName, cutDATName, edgesDATName})) + ) insertOutput (edgesDATName, false, {}); - } } // ============================================================================= @@ -485,7 +488,7 @@ DEFINE_ACTION (Coverer, 0) { setlocale (LC_ALL, "C"); - if (!checkProgPath (prog_coverer, Coverer)) + if (!checkProgPath (Coverer)) return; QDialog* dlg = new QDialog; @@ -541,7 +544,7 @@ DEFINE_ACTION (Isecalc, 0) { setlocale (LC_ALL, "C"); - if (!checkProgPath (prog_isecalc, Isecalc)) + if (!checkProgPath (Isecalc)) return; Ui::IsecalcUI ui; @@ -593,7 +596,7 @@ DEFINE_ACTION (Edger2, 0) { setlocale (LC_ALL, "C"); - if (!checkProgPath (prog_edger2, Edger2)) + if (!checkProgPath (Edger2)) return; QDialog* dlg = new QDialog;