MergeBranch.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 2 Nov 2018 08:40:58 +0000 (16:40 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 2 Nov 2018 08:40:58 +0000 (16:40 +0800)
MergeBranch.vala

MergeBranch.bjs
MergeBranch.vala

index 90bafbc..8bd4bcb 100644 (file)
@@ -89,7 +89,7 @@
         },
         {
          "listeners" : {
-          "changed" : "() => {\n\tif (this.loading) {\n\t\treturn;\n\t}\n\tvar ticket_id = this.selectedTicketId();\n\t\n\tvar name = RooTicket.singleton().usernameLocal();\n\t\n\tif (ticket_id != null && ticket_id != \"\") {\n\t\t_this.ticket = RooTicket.singleton().getById(ticket_id);\n\t} else {\n\t\t_this.ticket = null;\n\t}\n\t \n\n  \t_this.name.updateText();\n\t//_this.name.el.set_text(\"wip_%s_T%s_%s\".printf(name,ticket.id, ticket.summaryToBranchName()));\n\t\n\t//GLib.debug (//\"Selection: %s, %s\\n\", (string) val1, (string) val2);\n}"
+          "changed" : "() => {\n\tif (this.loading) {\n\t\treturn;\n\t}\n\tvar ticket_id = this.selectedTicketId();\n\t\n\tvar name = RooTicket.singleton().usernameLocal();\n\t\n\tif (ticket_id != null && ticket_id != \"\") {\n\t\t_this.ticket = RooTicket.singleton().getById(ticket_id);\n\t} else if ticket_id != null && ticket_id == \"\")\n\t\t_this.ticket = null;\n\t}\n\t \n  \t_this.name.updateText();\n\t//_this.name.el.set_text(\"wip_%s_T%s_%s\".printf(name,ticket.id, ticket.summaryToBranchName()));\n\t\n\t//GLib.debug (//\"Selection: %s, %s\\n\", (string) val1, (string) val2);\n}"
          },
          "id" : "ticketsel",
          "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
index 2b01ed0..5357e04 100644 (file)
@@ -419,11 +419,10 @@ public class MergeBranch : Object
                
                if (ticket_id != null && ticket_id != "") {
                        _this.ticket = RooTicket.singleton().getById(ticket_id);
-               } else {
+               } else if ticket_id != null && ticket_id == "")
                        _this.ticket = null;
                }
                 
-            
                _this.name.updateText();
                //_this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));