Unverified Commit 1aaa152f authored by Vaibhav Sagar's avatar Vaibhav Sagar Committed by GitHub

Merge pull request #1247 from jamesdbrock/replaceOutput

replaceOutput runs without flickering the GUI
parents dfcbe59c 9f76defd
......@@ -77,4 +77,6 @@ import IHaskell.Display.Widgets.Common as X
import IHaskell.Display.Widgets.Types as X (setField, getField, properties, triggerDisplay,
triggerChange, triggerClick, triggerSelection,
triggerSubmit, ChildWidget(..), StyleWidget(..),
WidgetFieldPair(..), Date(..), unlink, JSONByteString(..))
WidgetFieldPair(..), Date(..), unlink,
JSONByteString(..), OutputMsg(..))
......@@ -107,8 +107,8 @@ clearOutput_ widget = widgetClearOutput True >> clearOutput' widget
-- | Replace the currently displayed output for output widget
replaceOutput :: IHaskellDisplay a => OutputWidget -> a -> IO ()
replaceOutput widget d = do
clearOutput_ widget
appendDisplay widget d
disp <- display d
setField widget Outputs [OutputData disp]
instance IHaskellWidget OutputWidget where
getCommUUID = uuid
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment