SVG import dialog cannot be canceled. This X button does nothing when there is nothing selected
When something is selected, then the X works but it loads the file anyways instead of canceling the operation.
Actually, a cancel button would be nice here, otherwise, there is no way to cancel this window.
OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: d76124b61e35d3ce7ffec128bf3c07756d7e79a3
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
SVG Import cannot be canceled.
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
SVG Import cannot be canceled.
- Attachments
-
- Screenshot-20201010154241-375x319.png (36.54 KiB) Viewed 526 times
Re: SVG Import cannot be canceled.
I have this tab open for a pretty long time but wanted to check the code.
The mentioned behavior is on purpose, and I think allowing at this dialog to be canceled wouldn't be trivial.
From my PoV, this is quite correct though. When you import a STEP (where there is no subsequent option), you can't cancel once the 'Import' button of the file dialog has been clicked. That's same here, except there is an intermediate choice that shall be done (even if you mistook the original import action and have then to cancel).
IMO what could be a sensible change is to remove the 'X' close button of the dialog (and nothing more).
The mentioned behavior is on purpose, and I think allowing at this dialog to be canceled wouldn't be trivial.
From my PoV, this is quite correct though. When you import a STEP (where there is no subsequent option), you can't cancel once the 'Import' button of the file dialog has been clicked. That's same here, except there is an intermediate choice that shall be done (even if you mistook the original import action and have then to cancel).
IMO what could be a sensible change is to remove the 'X' close button of the dialog (and nothing more).
Re: SVG Import cannot be canceled.
Hi OpenBrain,
Thanks for the reply.
I was about to import an .step file.. then I clicked on an .svg file by mistake which is acceptable since end-users do these kinds of mistakes.
Then I was not able to cancel this dialog which is ok, but not good since I am seeing this X button available for that thing.
Then I have to choose the option that I don't want.
It is not a big deal, but it looks like the software is kind of broken or something...
So, why is it such a hard task to cancel/dismiss this popup thing?
Also, why not consider one workaround then...
Maybe the X button could select one of the options, load the file and close it immediately.
Thanks for the reply.
I was about to import an .step file.. then I clicked on an .svg file by mistake which is acceptable since end-users do these kinds of mistakes.
Then I was not able to cancel this dialog which is ok, but not good since I am seeing this X button available for that thing.
Then I have to choose the option that I don't want.
It is not a big deal, but it looks like the software is kind of broken or something...
So, why is it such a hard task to cancel/dismiss this popup thing?
Also, why not consider one workaround then...
Maybe the X button could select one of the options, load the file and close it immediately.
Re: SVG Import cannot be canceled.
Not sure how hard it would be, but sure not trivial. I don't know how deep you expect the explanation, but this is due to some implementation choices. They have been made to make the addition of new importers easier and more flexible. The dialog you see is displayed as soon as there are more than one importer module for a same file type. And it is automatically populated with the list of import modules currently available on the user's computer. What is expected as a return value (when the dialog is closed) is -- in a simplified way -- the chosen module. Oppositely to other standard dialogs where the return value is a status : accept, cancel,... A cancelation mechanism hasn't been implemented (on purpose IMO) and willing to do so would imply to carefully check all side effects, and potentially rewrite a part of the existing code. ATM it looks to me as it's not worth the hassle.