linebender/druid

Selecting multiple files / directories is not actually implemented.

Open

#1,067 opened on Jun 29, 2020

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Rust (567 forks)batch import
bughelp wanted

Repository metrics

Stars
 (9,091 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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