瀏覽代碼

fix save-as window (#11013)

* fix save-as window

Signed-off-by: carlitosan <[email protected]>

* restore azQTcomponent

Signed-off-by: carlitosan <[email protected]>
carlitosan 3 年之前
父節點
當前提交
9044d64f96
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp

+ 3 - 3
Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp

@@ -1693,8 +1693,8 @@ namespace ScriptCanvasEditor
             }
             }
             else
             else
             {
             {
-                auto sourceHandlePath = sourceHandle.RelativePath();
-                suggestedFilename = sourceHandle.RelativePath().Native();
+                auto sourceHandlePath = sourceHandle.AbsolutePath();
+                suggestedFilename = sourceHandle.AbsolutePath().Native();
                 sourceHandlePath.RemoveFilename();
                 sourceHandlePath.RemoveFilename();
                 suggestedDirectoryPath = sourceHandlePath.Native();
                 suggestedDirectoryPath = sourceHandlePath.Native();
             }
             }
@@ -1706,7 +1706,7 @@ namespace ScriptCanvasEditor
         
         
         while (!isValidFileName)
         while (!isValidFileName)
         {
         {
-            selectedFile = AzQtComponents::FileDialog::GetSaveFileName(this, tr("Save As..."), suggestedDirectoryPath.data(), filter);
+            selectedFile = AzQtComponents::FileDialog::GetSaveFileName(this, QObject::tr("Save As..."), suggestedDirectoryPath.data(), QObject::tr("All ScriptCanvas Files (*.scriptcanvas)"));
 
 
             // If the selected file is empty that means we just cancelled.
             // If the selected file is empty that means we just cancelled.
             // So we want to break out.
             // So we want to break out.