diff --git a/include/maskfld.cpp b/include/maskfld.cpp index d265eab70..f5171c599 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -2613,22 +2613,13 @@ bool TBrowse::do_link(bool insert) { bool ok = false; TString app; - - if (_insert[0] == 'M') - { - TString nm(_insert.mid(1)); - if (nm.compare("tb", 2, true) == 0) // Programma gestione tabelle - _cursor->file().get_relapp(app); - else // Programma generico di browse/edit - app.format("ba3 -3 %s %d", (const char*)nm, _cursor->file().num()); - } + if (_insert.starts_with("MTB", true)) + _cursor->file().get_relapp(app); else - { app = _insert.mid(1); - } if (app.find('#') >= 0) { - TString w(app); + const TString w(app); app = ""; for (const char* f = w; *f; f++) { diff --git a/include/tabutil.cpp b/include/tabutil.cpp index 813db1c6c..186b8f465 100755 --- a/include/tabutil.cpp +++ b/include/tabutil.cpp @@ -281,16 +281,10 @@ bool TTable::get_relapp(TString& app) const app = fi._tabapp; if (app.empty()) app = fi._relapp; + if (app.empty() && fi._module.compare("ba", 2, TRUE) != 0) + app = ini_get_string(CONFIG_STUDIO, fi._module, "TabPrg"); if (app.empty()) - { app = "ba3 -0"; - if (fi._module.compare("ba", 2, TRUE) != 0) - { - TConfig c(CONFIG_STUDIO, fi._module); - if (c.exist("TabPrg")) - app = c.get("TabPrg"); - } - } app << ' '; if (num() == LF_TABCOM) app << '%';