Skip to content

Commit

Permalink
Removing small bug that showed a text box while running a project aft…
Browse files Browse the repository at this point in the history
…er running an example without print.
  • Loading branch information
pedro-andrade-inpe committed Sep 28, 2017
1 parent ecaec26 commit 078bce8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lua/terrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,7 @@ function _Gtme.execExample(example, packageName)
local description
local okButton

local oldPrint = print
print = function(value)
if not mdialog then
mdialog = qt.new_qobject(qt.meta.QDialog)
Expand Down Expand Up @@ -1079,6 +1080,7 @@ function _Gtme.execExample(example, packageName)

local success, result = pcall(function() runScript(example) end)
if not success then
print = oldPrint
return false, result
end

Expand All @@ -1087,6 +1089,7 @@ function _Gtme.execExample(example, packageName)
mdialog:exec()
end

print = oldPrint
return success
end

Expand Down

0 comments on commit 078bce8

Please sign in to comment.