src/ldObject.cc

changeset 848
68410477c8bb
parent 847
274a7fac44fc
child 850
a3d72b0e916d
equal deleted inserted replaced
847:274a7fac44fc 848:68410477c8bb
25 #include "editHistory.h" 25 #include "editHistory.h"
26 #include "glRenderer.h" 26 #include "glRenderer.h"
27 #include "colors.h" 27 #include "colors.h"
28 #include "glCompiler.h" 28 #include "glCompiler.h"
29 29
30 CFGENTRY (String, defaultName, ""); 30 CFGENTRY (String, defaultName, "");
31 CFGENTRY (String, defaultUser, ""); 31 CFGENTRY (String, defaultUser, "");
32 CFGENTRY (Int, defaultLicense, 0); 32 CFGENTRY (Bool, UseCALicense, true);
33 33
34 // List of all LDObjects 34 // List of all LDObjects
35 QMap<long, LDObjectWeakPtr> g_allObjects; 35 QMap<long, LDObjectWeakPtr> g_allObjects;
36 static int32 g_idcursor = 1; // 0 shalt be null 36 static int32 g_idcursor = 1; // 0 shalt be null
37 static constexpr int32 g_maxID = (1 << 24); 37 static constexpr int32 g_maxID = (1 << 24);
885 invertnext->deselect(); 885 invertnext->deselect();
886 } 886 }
887 887
888 // ============================================================================= 888 // =============================================================================
889 // 889 //
890 QString getLicenseText (int id) 890 QString PreferredLicenseText()
891 { 891 {
892 switch (id) 892 return (cfg::UseCALicense ? CALicenseText : "");
893 {
894 case 0:
895 return g_CALicense;
896
897 case 1:
898 return g_nonCALicense;
899
900 case 2:
901 return "";
902 }
903
904 assert (false);
905 return "";
906 } 893 }
907 894
908 // ============================================================================= 895 // =============================================================================
909 // 896 //
910 LDObjectPtr LDObject::createCopy() const 897 LDObjectPtr LDObject::createCopy() const

mercurial