Przeglądaj źródła

find models like other resources

Johann 5 lat temu
rodzic
commit
24e1b49015
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      lazpaint/lazpaintmainform.pas

+ 3 - 2
lazpaint/lazpaintmainform.pas

@@ -899,7 +899,8 @@ implementation
 uses LCLIntf, BGRAUTF8, ugraph, math, umac, uclipboard, ucursors,
    ufilters, ULoadImage, ULoading, UFileExtensions, UBrushType,
    ugeometricbrush, UPreviewDialog, UQuestion, BGRALayerOriginal,
-   BGRATransform, LCVectorPolyShapes, URaw, UFileSystem;
+   BGRATransform, LCVectorPolyShapes, URaw, UFileSystem,
+   UTranslation;
 
 const PenWidthFactor = 10;
 
@@ -2032,7 +2033,7 @@ begin
   Open3DObjectDialog.InitialDir := Config.Default3dObjectDirectory;
   if Open3DObjectDialog.InitialDir = '' then
   begin
-    dir3d := {$IFDEF WINDOWS}SysToUTF8({$ENDIF}ExtractFilePath(Application.ExeName){$IFDEF WINDOWS}){$ENDIF}+'models';
+    dir3d := GetResourcePath('models');
     if DirectoryExistsUTF8(dir3d) then
       Open3DObjectDialog.InitialDir := dir3d;
   end;