summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-17 20:25:14 +0000
committerDavid Robillard <d@drobilla.net>2008-08-17 20:25:14 +0000
commit9938fac4b15f8939c9056c16a3a7662575af52e1 (patch)
tree7d636d1e5598c618015699eb95f33d0fdbe4194d /src/libs/gui
parent9dadfb83f9ce69a870362824bc6a3cad371385af (diff)
downloadingen-9938fac4b15f8939c9056c16a3a7662575af52e1.tar.gz
ingen-9938fac4b15f8939c9056c16a3a7662575af52e1.tar.bz2
ingen-9938fac4b15f8939c9056c16a3a7662575af52e1.zip
Select pasted objects.
Clean up parser debug output. git-svn-id: http://svn.drobilla.net/lad/ingen@1425 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/PatchCanvas.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index e2511a4b..040cf3c7 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -579,12 +579,16 @@ PatchCanvas::paste()
return;
}
+ clear_selection();
+
Builder builder(*App::instance().engine());
ClientStore clipboard;
clipboard.new_patch("/", _patch->poly());
clipboard.set_plugins(App::instance().store()->plugins());
parser->parse_string(App::instance().world(), &clipboard, str, "/");
for (Store::iterator i = clipboard.begin(); i != clipboard.end(); ++i) {
+ if (i->first == "/")
+ continue;
/*GraphObject::Properties::iterator s = i->second->properties().find("ingen:symbol");
const string sym = string(s->second.get_string()) + "_copy";
s->second = sym;*/
@@ -594,6 +598,11 @@ PatchCanvas::paste()
GraphObject::Variables::iterator y = i->second->variables().find("ingenuity:canvas-y");
if (y != i->second->variables().end())
y->second = y->second.get_float() + 20.0f;
+ GraphObject::Properties::iterator s = i->second->properties().find("ingen:selected");
+ if (s != i->second->properties().end())
+ s->second = true;
+ else
+ i->second->properties().insert(make_pair("ingen:selected", true));
builder.build(i->second);
}
}