I discovered, that my old Config file was ~ 10MB of size. Each time I was assigning globals, they were appended into the file with their values, instead of being replaced. Is it correct behaviour?
*Adam Borczyk* *---------------------------------* *GIS Support Sp. z o.o.* DobrzaĆskiego 3, <https://maps.google.com/?q=Dobrza%C5%84skiego+3,%C2%A0Lublin+20-262&entry=gmail&source=g>Lublin 20-262 <https://maps.google.com/?q=Dobrza%C5%84skiego+3,%C2%A0Lublin+20-262&entry=gmail&source=g> tel. 814511490, NIP: 9462641761, *www.gis-support.pl <http://www.gis-support.pl>* [email protected] On 19 April 2018 at 13:26, Adam Borczyk <[email protected]> wrote: > Hi everyone, > > I recently sent an e-mail here about JSON string variables messing up my > globals in QGIS 2.18. Today I experienced another bug (?) - very simple > global variable just does not get loaded. The code is: > > # Inside SocketIO worker class: > > def get_srid(self): > # socket request to the server, returning EPSG code as integer > self.emit('srid', {}, lambda data: self.assign_srid(data)) > > def assign_srid(self, data): > QgsExpressionContextUtils.setGlobalVariable('srid', str(data)) > QgsMessageLog.logMessage('Assigned SRID: %d' % data , 'myPlugin') > > The result of calling get_srid() is correct "Assigned SRID: 4326" in Log > Messages Panel, but in Properties the variable "SRID" is still empty. > Sometimes it works though, after some random number of tries. It also > worked after I purged ~/.config/QGIS/QGIS2.conf file, but it'll possibly > happen again. > > Is there anything I have to take special care of? > > > Best regards > *Adam Borczyk* >
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
