Commit 59d52948 authored by Vidjil Team's avatar Vidjil Team Committed by Mathieu Giraud
Browse files

model.js: Don't select virtual clones

The previous code was fantastically overcomplicated
(which could be summarised by “WTF”).

Now we make use of the isVirtual() function to determine
is a clone can be selected.

Commit performed by trio-programming: @tydax @RyanHerb @mikael-s
parent daa87f41
......@@ -773,11 +773,9 @@ changeCloneNotation: function(cloneNotationType) {
console.log("select() (clone " + cloneID + ")");
// others shouldn't be selectable
var posOthers = {};
for (var i = this.clones.length - this.system_available.length; i <= this.clones.length - 1; i++) {
if (m.clones[cloneID].isVirtual()) {
return 0;
if (cloneID in posOthers) {return 0;};
if (this.clone(cloneID).isSelected()) {
this.clone(cloneID).select = false;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment