linebender/druid

Selecting multiple files / directories is not actually implemented.

Open

#1.067 geöffnet am 29. Juni 2020

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (567 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (9.091 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

A bug I ran into just now:

I currently have:

    let dialog_options = FileDialogOptions::new()
        .select_directories()
        .multi_selection();

    let window = WindowDesc::new(build_schauglas)
        .menu(MenuDesc::new(LocalizedString::new("menubar")).append(
            MenuDesc::new(LocalizedString::new("file").with_placeholder("File")).append(
                MenuItem::new(
                    LocalizedString::new("open").with_placeholder("Open"),
                    Command::new(SHOW_OPEN_PANEL, dialog_options),
                ),
            ),
        ));

And in my delegate, I am simply printing out whatever command gets in:

      -> bool {
        debug!("Cmd: {:?}", cmd);
        if let Some(file_info) = cmd.get(OPEN_FILE) {
            return true;
        }

        false
    }

this gives me the following outputs:

  • When selecting a single directory: Cmd: Command { symbol: "druid-builtin.open-file-path", payload: Any }
  • When selecting multiple:

Info:

  • Windows 10
  • Druid 0.6

Contributor Guide