mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Merge d346997d83 into 7e60406373
This commit is contained in:
commit
dfc9c75934
4 changed files with 35 additions and 10 deletions
|
|
@ -235,7 +235,6 @@ function SettingsPage:render()
|
|||
description = "Editing files in Studio will sync them into the filesystem",
|
||||
locked = self.props.syncActive,
|
||||
lockedTooltip = "(Cannot change while currently syncing. Disconnect first.)",
|
||||
tag = "unstable",
|
||||
transparency = self.props.transparency,
|
||||
layoutOrder = layoutIncrement(),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@ function ChangeBatcher:__cycle(dt)
|
|||
self.__onChangesFlushed(patch)
|
||||
end
|
||||
end
|
||||
|
||||
self.__instanceMap:unpauseAllInstances()
|
||||
end
|
||||
|
||||
function ChangeBatcher:__flush()
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ end
|
|||
--[[
|
||||
Pause updates for an instance.
|
||||
]]
|
||||
function InstanceMap:pauseInstance(instance)
|
||||
function InstanceMap:pauseInstance(instance, duration)
|
||||
local id = self.fromInstances[instance]
|
||||
|
||||
-- If we don't know about this instance, ignore it.
|
||||
|
|
@ -153,7 +153,8 @@ function InstanceMap:pauseInstance(instance)
|
|||
return
|
||||
end
|
||||
|
||||
self.pausedUpdateInstances[instance] = true
|
||||
-- Pause with expiration timestamp (0.6s) to ensure property replication signals settle
|
||||
self.pausedUpdateInstances[instance] = os.clock() + (duration or 0.6)
|
||||
end
|
||||
|
||||
--[[
|
||||
|
|
@ -202,8 +203,13 @@ end
|
|||
function InstanceMap:__maybeFireInstanceChanged(instance, propertyName)
|
||||
Log.trace("{}.{} changed", instance:GetFullName(), propertyName)
|
||||
|
||||
if self.pausedUpdateInstances[instance] then
|
||||
return
|
||||
local pauseExpiry = self.pausedUpdateInstances[instance]
|
||||
if pauseExpiry ~= nil then
|
||||
if os.clock() < pauseExpiry then
|
||||
return
|
||||
else
|
||||
self.pausedUpdateInstances[instance] = nil
|
||||
end
|
||||
end
|
||||
|
||||
if self.onInstanceChanged == nil then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue