diff --git a/uppsrc/ide/Insert.cpp b/uppsrc/ide/Insert.cpp index d6176dfdc..29602c2eb 100644 --- a/uppsrc/ide/Insert.cpp +++ b/uppsrc/ide/Insert.cpp @@ -272,14 +272,6 @@ void Ide::InsertMenu(Bar& bar) } } } - if(editfile.GetCount()) { - ParserContext ctx; - editor.Context(ctx, editor.GetCursor()); - if(!IsNull(ctx.current_scope) && ctx.current_scope != "::" && !ctx.IsInBody()) { - String s = "typedef " + ctx.current_scope + " CLASSNAME;"; - bar.Add(s, THISBACK1(InsertText, s)); - } - } bar.Add("Insert file path..", THISBACK1(InsertFilePath, false)); bar.Add("Insert file path as C string..", THISBACK1(InsertFilePath, true)); bar.Add("Insert clipboard as..", [=] { InsertAs(); }); diff --git a/uppsrc/ide/LayDes/visgen.cpp b/uppsrc/ide/LayDes/visgen.cpp index 8dcf0da52..530edc338 100644 --- a/uppsrc/ide/LayDes/visgen.cpp +++ b/uppsrc/ide/LayDes/visgen.cpp @@ -91,22 +91,18 @@ void VisGenDlg::Refresh() if(layout.item[i].type == "Button" && findarg(bn, "cancel", "ok", "exit") < 0) { String mn = IdInitCaps(bn); mn.Replace("_", ""); - if(b1.GetCount() == 0) - b1 = "\n"; - if(b2.GetCount() == 0) - b2 = "\n"; b1 << '\t' << "void " << mn << "();\n"; b2 << '\t' << bn << " << [=] { " << mn << "(); };\n"; b3 << '\n' << "void " << n << "::" << mn << "()\n{\n}\n"; } } + if(b1.GetCount()) + b1 << "\n"; } if(q == 0) { s << "class " << n << " : public With" << layout.name << " {\n" - << "\ttypedef " << n << " CLASSNAME;\n" << b1 - << "\n" << "public:\n" << "\t" << n << "();\n" << "};\n" @@ -121,7 +117,6 @@ void VisGenDlg::Refresh() else if(q == 1) { s << "struct " << n << " : With" << layout.name << " {\n" - << "\ttypedef " << n << " CLASSNAME;\n" << b1 << "\t" << n << "();\n" << "};\n"