mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:02:53 +08:00
Remove misleading beatmap import method.
This commit is contained in:
parent
adb6f01e39
commit
b294386077
@ -9,6 +9,7 @@ using osu.Framework.Desktop.Platform;
|
|||||||
using osu.Desktop.Overlays;
|
using osu.Desktop.Overlays;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
|
|
||||||
namespace osu.Desktop
|
namespace osu.Desktop
|
||||||
@ -56,7 +57,7 @@ namespace osu.Desktop
|
|||||||
// this method will only be executed if e.Effect in dragEnter gets set to something other that None.
|
// this method will only be executed if e.Effect in dragEnter gets set to something other that None.
|
||||||
var dropData = e.Data.GetData(DataFormats.FileDrop) as object[];
|
var dropData = e.Data.GetData(DataFormats.FileDrop) as object[];
|
||||||
var filePaths = dropData.Select(f => f.ToString()).ToArray();
|
var filePaths = dropData.Select(f => f.ToString()).ToArray();
|
||||||
ImportBeatmapsAsync(filePaths);
|
Task.Run(() => BeatmapDatabase.Import(filePaths));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dragEnter(DragEventArgs e)
|
private void dragEnter(DragEventArgs e)
|
||||||
|
@ -84,7 +84,7 @@ namespace osu.Game
|
|||||||
if (args?.Length > 0)
|
if (args?.Length > 0)
|
||||||
{
|
{
|
||||||
var paths = args.Where(a => !a.StartsWith(@"-"));
|
var paths = args.Where(a => !a.StartsWith(@"-"));
|
||||||
ImportBeatmapsAsync(paths);
|
Task.Run(() => BeatmapDatabase.Import(paths));
|
||||||
}
|
}
|
||||||
|
|
||||||
Dependencies.Cache(this);
|
Dependencies.Cache(this);
|
||||||
@ -92,11 +92,6 @@ namespace osu.Game
|
|||||||
PlayMode = LocalConfig.GetBindable<PlayMode>(OsuConfig.PlayMode);
|
PlayMode = LocalConfig.GetBindable<PlayMode>(OsuConfig.PlayMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async void ImportBeatmapsAsync(IEnumerable<string> paths)
|
|
||||||
{
|
|
||||||
await Task.Run(() => BeatmapDatabase.Import(paths));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
Loading…
Reference in New Issue
Block a user