Commit a1633de9 authored by Bas Lijnse's avatar Bas Lijnse

Fixed disappearing windows in tab layout

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@2384 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 19c9a58e
......@@ -58,11 +58,10 @@ autoParallelLayout prompt defs
| additionalActions defs = additionalActionMerge prompt defs
= sequenceMerge prompt defs
where
allPartial [] = True
allPartial [] = True
allPartial [UIControlSequence {UIControlSequence|attributes}:ds]
| hasWindowAttr attributes = False
= allPartial ds
allPartial _ = False
= if (hasContainerAttr attributes) False (allPartial ds)
allPartial _ = False
additionalActions defs = scan False False defs
where
......@@ -361,7 +360,6 @@ where
merge prompt=:{UIControlSequence|attributes} defs
# pcontrols = decoratePrompt prompt.UIControlSequence.controls
# (activeIndex,activeDef) = findActive defs
# (tabBar,windows,actions) = mkTabsAndWindows activeIndex defs
# (actions,_,tabContent) = maybe ([],[],defaultPanel []) toTabContent activeDef
# controls = pcontrols ++ [tabBar,tabContent]
......@@ -400,7 +398,7 @@ where
mkTabsAndWindows active defs
# (tabsAndWindows,actions) = unzip [mkTabOrWindow (i == active) d \\ d <- defs & i <- [0..]]
= ((setDirection Horizontal o setHeight WrapSize o setBaseCls "x-tab-bar") (defaultContainer [tab \\Left tab <- tabsAndWindows])
,[window \\ Right window <- tabsAndWindows]
,flatten (map uiDefWindows defs) ++ [window \\ Right window <- tabsAndWindows]
,flatten actions
)
......@@ -800,6 +798,9 @@ actionToHotkey _ = Nothing
hasWindowAttr :: UIAttributes -> Bool
hasWindowAttr attributes = maybe False ((==) "window") (get CONTAINER_ATTRIBUTE attributes)
hasContainerAttr :: UIAttributes -> Bool
hasContainerAttr attributes = isJust (get CONTAINER_ATTRIBUTE attributes)
singleControl :: UIDef -> Bool
singleControl def = case uiDefControls def of
[_] = True
......
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