Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unexpected option returned from CommandSwitchWindow #2229

Closed
5 tasks done
thumDer opened this issue Apr 29, 2024 · 0 comments
Closed
5 tasks done

[Bug]: Unexpected option returned from CommandSwitchWindow #2229

thumDer opened this issue Apr 29, 2024 · 0 comments
Labels
Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] Tools Issues related to pyRevit commands [subsystem]

Comments

@thumDer
Copy link
Contributor

thumDer commented Apr 29, 2024

✈ Pre-Flight checks

  • I don't have SentinelOne antivirus installed (see above for the solution)
  • I have searched in the issues (open and closed) but couldn't find a similar issue
  • I have searched in the pyRevit Forum for similar issues
  • I already followed the installation troubleshooting guide thoroughly
  • I am using the latest pyRevit Version

🐞 Describe the bug

CommandSwitchWindow returns a switch key as a selected option if user highlights it with TAB and presses enter

2024-04-29_17-55-29.mp4

⌨ Error/Debug Message

No error message

♻️ To Reproduce

sample code for testing::

# -*- coding: UTF-8 -*-

from __future__ import print_function
from pyrevit import script, forms, revit

from Autodesk.Revit import DB

doc = revit.doc
uidoc = revit.uidoc

logger = script.get_logger()
output = script.get_output()

switch, option = forms.CommandSwitchWindow.show(
    ["opt1", "opt2"],
    switches=["switch1", "switch2"]
)

print(switch, option)

⏲️ Expected behavior

Return no selected options

🖥️ Hardware and Software Setup (please complete the following information)

❯ pyrevit env
==> Registered Clones (full git repos)
dev | Branch: "feature/show-view-range" | Version: "4.8.16:354ca85" | Path: "C:\Users\tamas.deri\Documents\repos\pyRevit-dev\dev"
==> Registered Clones (deployed from archive/image)
main | Deploy: "base" | Branch: "develop-4" | Version: "4.8.16" | Path: "C:\pyRevit\main"
==> Attachments
dev | Product: "Autodesk Revit 2024" | Engine: DEFAULT (2711) | Path: "C:\Users\tamas.deri\Documents\repos\pyRevit-dev\dev"
dev | Product: "Autodesk Revit 2023" | Engine: DEFAULT (2711) | Path: "C:\Users\tamas.deri\Documents\repos\pyRevit-dev\dev"
main | Product: "Autodesk Revit 2022" | Engine: DEFAULT (2711) | Path: "C:\pyRevit\main"
main | Product: "Autodesk Revit 2021" | Engine: DEFAULT (2711) | Path: "C:\pyRevit\main"
main | Product: "2020.2.5" | Engine: DEFAULT (2711) | Path: "C:\pyRevit\main"
main | Product: "2019.2.1" | Engine: DEFAULT (2711) | Path: "C:\pyRevit\main"

Additional context

No response

@thumDer thumDer added the Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] label Apr 29, 2024
@jmcouffin jmcouffin added the Tools Issues related to pyRevit commands [subsystem] label Apr 30, 2024
thumDer added a commit that referenced this issue May 2, 2024
@thumDer thumDer closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] Tools Issues related to pyRevit commands [subsystem]
Projects
None yet
Development

No branches or pull requests

2 participants