Fix #5617 - issue with create ticket not emptying fields
authorAlan Knowles <alan@roojs.com>
Tue, 18 Dec 2018 02:01:23 +0000 (10:01 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 18 Dec 2018 02:01:23 +0000 (10:01 +0800)
Ticket.bjs
Ticket.vala

index 13acc83..a451a07 100644 (file)
@@ -17,7 +17,7 @@
    "title" : "Create a Ticket",
    "xtype" : "Dialog",
    "# GitRepo? repo" : "null",
-   "|   void show" : "( GitRepo? repo   ) \n{\n     // this.el.set_gravity(Gdk.Gravity.NORTH);\n    if (this.running) { // should not happen!!\n    \tGLib.error(\"new branch show called, when already being displayed?\");\n\t}\n \n\t\n\tthis.running  = true;\n\t//GitMonitor.gitmonitor.stop();\n\t\n    this.repo = repo;\n    \n    \n    \n    \n\tthis.el.move((Gdk.Screen.width() / 2)- 250 ,0);\n\tthis.el.set_default_size( 500,200); // not sure why it grows..\n    GLib.debug(\"Loading tickets\"); \n     \n\n    this.el.show_all();\n    this.el.set_keep_above(true);\n   \n\n\tRooProject? curproj = null;\n    if (this.repo != null) {\n\t    curproj = RooTicket.singleton().getProjectByRepo(this.repo);\n    }\n\t_this.prmodel.loadProjects(curproj == null ? \"\" : curproj.id);\n    if (curproj != null) {\n \n\t\t\n\t\tvar rt = RooTicket.singleton();\n\t\trt.loadProjectOptions(curproj.id);\n\t\t\n\t\t_this.msmodel.loadMilestones();\n\t\t_this.primodel.loadPriorities();\n\t\t_this.sevmodel.loadSeverities();\n\t\t_this.clmodel.loadClassifications();\t\n\t\t_this.devmodel.loadDevelopers();\t\n\t\t\n    }\n \n \tthis.el.run();\n\n}",
+   "|   void show" : "( GitRepo? repo   ) \n{\n     // this.el.set_gravity(Gdk.Gravity.NORTH);\n    if (this.running) { // should not happen!!\n    \tGLib.error(\"new branch show called, when already being displayed?\");\n\t}\n \n\t\n\tthis.running  = true;\n\t//GitMonitor.gitmonitor.stop();\n\t\n    this.repo = repo;\n    \n    \n    \n    \n\tthis.el.move((Gdk.Screen.width() / 2)- 250 ,0);\n\tthis.el.set_default_size( 500,200); // not sure why it grows..\n    GLib.debug(\"Loading tickets\"); \n     \n\n    this.el.show_all();\n    this.el.set_keep_above(true);\n   \n\n\tRooProject? curproj = null;\n    if (this.repo != null) {\n\t    curproj = RooTicket.singleton().getProjectByRepo(this.repo);\n    }\n\t_this.prmodel.loadProjects(curproj == null ? \"\" : curproj.id);\n    if (curproj != null) {\n \n\t\t\n\t\tvar rt = RooTicket.singleton();\n\t\trt.loadProjectOptions(curproj.id);\n\t\t\n\t\t_this.msmodel.loadMilestones();\n\t\t_this.primodel.loadPriorities();\n\t\t_this.sevmodel.loadSeverities();\n\t\t_this.clmodel.loadClassifications();\t\n\t\t_this.devmodel.loadDevelopers();\t\n\t\t\n    }\n    \t_this.summary.el.set_text(\"\");\n\t\t_this.description.el.buffer.text = \"\"; \n    \n \n \tthis.el.run();\n\n}",
    "default_height" : 200,
    "$ xns" : "Gtk",
    "# bool running" : false,
index 02f71b5..6c5b028 100644 (file)
@@ -134,6 +134,9 @@ public class Ticket : Object
                _this.devmodel.loadDevelopers();        
                
         }
+               _this.summary.el.set_text("");
+               _this.description.el.buffer.text = ""; 
+        
      
        this.el.run();