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

QTVCP - corecting my mistake #1085

Merged
merged 2 commits into from
Feb 15, 2021
Merged

Conversation

satiowadahc
Copy link
Contributor

No description provided.

@satiowadahc
Copy link
Contributor Author

@c-morley is there any interfaces I haven't thought to check?

@c-morley
Copy link
Collaborator

That should be it. Most use the default file dialogs/widgets.
I'll try to remember when I add Jura's woodpecker screen.

Thanks again

@c-morley c-morley merged commit 3368c01 into LinuxCNC:master Feb 15, 2021
@phillc54
Copy link
Collaborator

This commit isn't quite correct, even with a valid file it returns. This is an example of a valid file that has been given a temp filename:
/tmp/emcflt-nhNtDS.d/shape_testing_3_metric.ngc
I have commented it out in QtPlasmaC

@c-morley
Copy link
Collaborator

Yes I guess it would be better just to check the filename rather then the whole path

@c-morley
Copy link
Collaborator

how about this:

def file_loaded(self, obj, filename):
if os.path.basename(filename).count('.') > 1:
self.lastLoadedProgram = ""
return

@phillc54
Copy link
Collaborator

I am not 100% sure what the issue was.

@c-morley
Copy link
Collaborator

it counts the . in the file path - any more then one will fail.
He just wants to test the filename that the user gives so they don't do program.2.ngc

@phillc54
Copy link
Collaborator

OK, then you solution seems good.
Is the a reason for not allowing something like program.2.ngc

@c-morley
Copy link
Collaborator

Caused crashes apparently.
#1082

I'll push the change shortly - sorry for the problems

@phillc54
Copy link
Collaborator

No worries at all, thanks.

@c-morley
Copy link
Collaborator

ok pushed. thanks for testing code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants