fix: create copy of signal data
This commit is contained in:
parent
7fd1f9c468
commit
b4a70d6aa4
|
@ -37,12 +37,12 @@ QtObject:
|
||||||
|
|
||||||
self.signalSubscribers[signalType].add(subscriber)
|
self.signalSubscribers[signalType].add(subscriber)
|
||||||
|
|
||||||
proc processSignal(self: SignalsController) =
|
proc processSignal(self: SignalsController, statusSignal: string) =
|
||||||
var jsonSignal:JsonNode
|
var jsonSignal: JsonNode
|
||||||
try:
|
try:
|
||||||
jsonSignal = self.statusSignal.parseJson
|
jsonSignal = statusSignal.parseJson
|
||||||
except:
|
except:
|
||||||
error "Invalid signal received", data = self.statusSignal
|
error "Invalid signal received", data = statusSignal
|
||||||
return
|
return
|
||||||
|
|
||||||
let signalString = jsonSignal["type"].getStr
|
let signalString = jsonSignal["type"].getStr
|
||||||
|
@ -94,7 +94,7 @@ QtObject:
|
||||||
|
|
||||||
proc receiveSignal(self: SignalsController, signal: string) {.slot.} =
|
proc receiveSignal(self: SignalsController, signal: string) {.slot.} =
|
||||||
self.statusSignal = signal
|
self.statusSignal = signal
|
||||||
self.processSignal()
|
self.processSignal(signal)
|
||||||
self.signalReceived(signal)
|
self.signalReceived(signal)
|
||||||
|
|
||||||
QtProperty[string] statusSignal:
|
QtProperty[string] statusSignal:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit e3baf29683f713ec418d3bb5c39fa043bd87f92f
|
Subproject commit b758bf3025f0f3912e5005b232c3b4430848de1a
|
Loading…
Reference in New Issue