From 45b6f61ac9ae96fd91aec107b011383a962aa6cf Mon Sep 17 00:00:00 2001 From: "ahrenholz@gmail.com" Date: Thu, 5 Dec 2013 23:42:14 +0000 Subject: [PATCH] enter runtime state when start button pressed with empty canvas (Boeing r1805) --- trunk/gui/api.tcl | 10 ++-------- trunk/gui/exec.tcl | 6 ++++-- trunk/gui/plugins.tcl | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/trunk/gui/api.tcl b/trunk/gui/api.tcl index 35dd39d4..3ddaf297 100755 --- a/trunk/gui/api.tcl +++ b/trunk/gui/api.tcl @@ -2358,8 +2358,9 @@ proc sendConfReplyMessage { channel node model types values opaque } { } if { $prmsg == 1 } { - puts -nonewline ">CONF(flags=0x0,mod=$model," + puts -nonewline ">CONF(flags=0," if {$node > -1 } { puts -nonewline "node=$node," } + puts -nonewline "obj=$model,cflags=0" if {$session != "" } { puts -nonewline "session=$session," } if {$opaque != "" } { puts -nonewline "opaque=$opaque," } puts "types=<$types>,values=<$values>) reply" @@ -2495,13 +2496,6 @@ proc deployCfgAPI { sock } { return } - set nodecount [getNodeCount] - if { $nodecount == 0 } { - # This allows switching to exec mode without extra API messages, - # such as when connecting to a running session. - return - } - set deployCfgAPI_lock 1 ;# lock set mac_byte4 0 diff --git a/trunk/gui/exec.tcl b/trunk/gui/exec.tcl index 3022ed95..22799c46 100755 --- a/trunk/gui/exec.tcl +++ b/trunk/gui/exec.tcl @@ -345,7 +345,7 @@ proc startStopButton { mode } { # INPUTS # * mode -- the new operating mode. Can be edit or exec. #**** -proc setOperMode { mode } { +proc setOperMode { mode { type "" } } { global oper_mode activetool global undolevel redolevel global g_prefs @@ -399,7 +399,9 @@ proc setOperMode { mode } { monitor_loop set plugin [lindex [getEmulPlugin "*"] 0] set emul_sock [pluginConnect $plugin connect false] - deployCfgAPI $emul_sock + if {$type != "connect"} { + deployCfgAPI $emul_sock + } widget_loop mobility_script_loop ### stop button is pressed diff --git a/trunk/gui/plugins.tcl b/trunk/gui/plugins.tcl index a6f2099a..eafe9ed6 100644 --- a/trunk/gui/plugins.tcl +++ b/trunk/gui/plugins.tcl @@ -1023,7 +1023,7 @@ proc connectShutdownSession { cmd channel sid fn } { } # connect to an existing session set currentFile $fn - setOperMode exec + setOperMode exec connect set flags 0x11 ;# add flag, status req flag } shutdown {