Skip to content

Commit

Permalink
Merge pull request #776 from BallAerospace/fix_test_runner_disconnect
Browse files Browse the repository at this point in the history
fix disconnect closes #775
  • Loading branch information
ryanmelt authored Apr 17, 2018
2 parents dfc0469 + 318eb5e commit 90c87a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/cosmos/tools/script_runner/script_runner_frame.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1140,14 +1140,18 @@ def toggle_disconnect(config_file, ask_for_config_file = true)
dialog_layout.addLayout(button_layout)

dialog.setLayout(dialog_layout)
my_parent = self.parent
while my_parent.parent
my_parent = my_parent.parent
end
if dialog.exec == Qt::Dialog::Accepted
if targets.empty?
clear_disconnected_targets()
self.parent.parent.parent.statusBar.showMessage("")
my_parent.statusBar.showMessage("")
self.setPalette(Qt::Palette.new(Cosmos::DEFAULT_PALETTE))
else
config_file = chooser.filename
self.parent.parent.parent.statusBar.showMessage("Targets disconnected: #{targets.join(" ")}")
my_parent.statusBar.showMessage("Targets disconnected: #{targets.join(" ")}")
self.setPalette(Qt::Palette.new(Cosmos::RED_PALETTE))
Splash.execute(self) do |splash|
ConfigParser.splash = splash
Expand Down

0 comments on commit 90c87a4

Please sign in to comment.