+
Skip to content

Conversation

gsohler
Copy link
Contributor

@gsohler gsohler commented May 25, 2023

fstl got issues when another tool rewrites the file while its beeing displayed.
fstl will reload too fast and does not display complete file.
ideally writing tool writes a tmp file and replaces with the real file in an atomic operation.

@lf94
Copy link

lf94 commented May 25, 2023

This would be fantastic to have merged in. It's an issue that blocks using many external tools proficiently.

@lf94
Copy link

lf94 commented May 25, 2023

Resolves #37

@DeveloperPaul123
Copy link
Member

@gsohler @lf94 I made one small change since unistd.h is not available on windows. Let me know if it still works for you

@gsohler
Copy link
Contributor Author

gsohler commented May 26, 2023

i tweaked your solution little bit to make it compile in linux again ...

sur5r added a commit to sur5r/fstl that referenced this pull request May 26, 2023
Fixes fstl-app#37.

It's the approach from fstl-app#106 but using Qt only.
@DeveloperPaul123
Copy link
Member

Sorry about that @gsohler, I didn't have time to test on my Linux setup. If it's all good for you I'm happy to merge

@gsohler
Copy link
Contributor Author

gsohler commented May 26, 2023

it works fine in my place. just tested again

@gsohler
Copy link
Contributor Author

gsohler commented May 26, 2023

sur5r, cant see your change in
https://github.com/sur5r/fstl/blob/master/src/window.cpp

@DeveloperPaul123
Copy link
Member

sur5r, cant see your change in https://github.com/sur5r/fstl/blob/master/src/window.cpp

Not sure if you saw, but he made a separate PR

@DeveloperPaul123 DeveloperPaul123 merged commit c4dd685 into fstl-app:master May 26, 2023
@gsohler
Copy link
Contributor Author

gsohler commented May 26, 2023

yes, is see now. sorry for looking close enough ... his PR still suggests usleep , tough ....

@gsohler gsohler deleted the autoreload branch May 26, 2023 13:33
@DeveloperPaul123
Copy link
Member

yes, is see now. sorry for looking close enough ... his PR still suggests usleep , tough ....

Yes that's true, but apparently it's a Qt function https://doc.qt.io/qt-5/qthread.html#usleep
I missed that as well

wdaniau added a commit to wdaniau/fstl that referenced this pull request May 27, 2023
wdaniau added a commit to wdaniau/fstl that referenced this pull request May 27, 2023
modifications and without the differences on spaces and tabs. Also moved the
test on open_action at the beginning of the load_stl method.

wait to load the stl file until file size  does not change anymore (fstl-app#106)
    * wait to load the stl file until file size  does not change anymore
    * Use std::sleep functions for cross platform compatibility
    * need to include <thread> to compile

    ---------

    Co-authored-by: Guenther Sohler <guenther.sohler@photeon.com>
    Co-authored-by: Paul T <developer.paul.123@gmail.com>
DeveloperPaul123 pushed a commit that referenced this pull request May 27, 2023
* Revert "wait to load the stl file until file size  does not change anymore (#106)"

This reverts commit c4dd685.

* This is a new version of the reverted commit c4dd685 with only actual
modifications and without the differences on spaces and tabs. Also moved the
test on open_action at the beginning of the load_stl method.

wait to load the stl file until file size  does not change anymore (#106)
    * wait to load the stl file until file size  does not change anymore
    * Use std::sleep functions for cross platform compatibility
    * need to include <thread> to compile

    ---------

    Co-authored-by: Guenther Sohler <guenther.sohler@photeon.com>
    Co-authored-by: Paul T <developer.paul.123@gmail.com>
DeveloperPaul123 pushed a commit that referenced this pull request May 31, 2023
Fixes #37.

It's the approach from #106 but using Qt only.
DeveloperPaul123 added a commit that referenced this pull request May 31, 2023
…more (#106)" (#109)

This reverts commit c4dd685.

# Conflicts:
#	src/window.cpp

With #107 merged, we no longer need the duplicated code in `window.cpp` as that logic was essentially moved to `loader.cpp` in #107
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.

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载