mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-16 11:26:08 +00:00
Merge pull request #1247 from jamesdbrock/replaceOutput
replaceOutput runs without flickering the GUI
This commit is contained in:
commit
1aaa152f1a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user