[0.21] [Gui] Py311 Initialization of locales... (#3)
* [0.21] [MainGui] Py311add initialization of locales ... ... with native environment setting * [0.21][Gui] use '%Y-%m-%d %H:%M:%S' as format string for date
This commit is contained in:
@@ -1677,7 +1677,7 @@ void View3DInventorPy::eventCallback(void * ud, SoEventCallback * n)
|
||||
// Type
|
||||
dict.setItem("Type", Py::String(std::string(e->getTypeId().getName().getString())));
|
||||
// Time
|
||||
dict.setItem("Time", Py::String(std::string(e->getTime().formatDate().getString())));
|
||||
dict.setItem("Time", Py::String(std::string(e->getTime().formatDate("%Y-%m-%d %H:%M:%S").getString())));
|
||||
SbVec2s p = n->getEvent()->getPosition();
|
||||
Py::Tuple pos(2);
|
||||
pos.setItem(0, Py::Int(p[0]));
|
||||
|
||||
@@ -98,6 +98,7 @@ private:
|
||||
int main( int argc, char ** argv )
|
||||
{
|
||||
#if defined (FC_OS_LINUX) || defined(FC_OS_BSD)
|
||||
setlocale(LC_ALL, ""); // use native environment settings
|
||||
// Make sure to setup the Qt locale system before setting LANG and LC_ALL to C.
|
||||
// which is needed to use the system locale settings.
|
||||
(void)QLocale::system();
|
||||
|
||||
Reference in New Issue
Block a user