@@ -4,6 +4,9 @@ constant kMaxLabelSize = 200
44# The inspector data
55local sDataA
66
7+ # used by manualHeight
8+ local sStackIsInFront
9+
710on setAsBehavior pTarget
811 dispatch "setAsBehavior" to revIDEFrameBehavior() with the long id of this me
912 set the behavior of pTarget to the long id of this me
@@ -36,6 +39,7 @@ before openStack
3639 end repeat
3740 set the stackfiles of me to tStackFiles
3841 revIDEPopDefaultFolder
42+ put true into sStackIsInFront
3943end openStack
4044
4145on resizeInspector
@@ -180,7 +184,8 @@ local sManualHeightOfStack, sNewHeight, sOldHeight
180184on inspectorLayoutGroups pGroupList, pForceHeight
181185
182186 # store height of stack when manually resizing
183- if pForceHeight is not true and the mouse is "down" and sNewHeight is not sOldHeight then
187+ if pForceHeight is not true and the mouse is "down" \
188+ and sNewHeight is not sOldHeight and the mouseStack is empty and sStackIsInFront then
184189 put the height of this stack into sManualHeightOfStack
185190 end if
186191
@@ -277,7 +282,11 @@ on inspectorLayoutGroups pGroupList, pForceHeight
277282
278283 local tStackHeight
279284 if tInspectorHeight is empty then
280- put kInspectorMinHeight into tStackHeight
285+ if sManualHeightOfStack is not empty then
286+ put sManualHeightOfStack into tStackHeight
287+ else
288+ put kInspectorMinHeight into tStackHeight
289+ end if
281290 else
282291 put tInspectorHeight + tMargin into tStackHeight
283292 end if
@@ -288,11 +297,6 @@ on inspectorLayoutGroups pGroupList, pForceHeight
288297 set the maxheight of me to tStackHeight
289298 end if
290299
291- # reset manualHeight if user expands a non-expandable tab to full height
292- if not pForceHeight and not tCanExpand and sManualHeightOfStack is tStackHeight then
293- put empty into sManualHeightOfStack
294- end if
295-
296300 -- Make stack smaller rather than go offscreen
297301 local tScreenRect , tNewStackHeight
298302 put revIDEStackScreenRect(the long id of me, true ) into tScreenRect
@@ -343,6 +347,16 @@ before resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight
343347 pass resizeStack
344348end resizeStack
345349
350+ on resumeStack
351+ put true into sStackIsInFront
352+ pass resumeStack
353+ end resumeStack
354+
355+ on suspendStack
356+ put false into sStackIsInFront
357+ pass suspendStack
358+ end suspendStack
359+
346360function getManualHeight
347361 return sManualHeightOfStack
348362end getManualHeight
0 commit comments