Closed yarikoptic closed 2 years ago
Great convenience upgrade! Thx!
It seems that the store is coming too late on deinit. not sure how exactly that happens. It may be a side-effect of the test setup.
I will look into it later. Works for you ok locally?
I will look into it later. Works for you ok locally?
Yes, perfect. Keep window geometry and FSBrowser column widths.
I have pushed f1d1b5151b1038db4201cdd7ddec6b4f6dcb55c3 but not sure if that is the best way or you (or I) would like it - dilutes somewhat main_window
logic etc. Please see commit for more description. I did try to just "monkey patch" .closeEvent upon that load_ui
but for some reason it didn't quite work for some reason.
edit: ideally, I feel, that more should be concentrated in such a class/closeEvent so there would be no need for manual calling of deinit
Base: 66.22% // Head: 66.58% // Increases project coverage by +0.35%
:tada:
Coverage data is based on head (
f1d1b51
) compared to base (01cf641
). Patch coverage: 94.59% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
After having used this for a while now, I am thinking of reverting this PR.
Two reasons:
Designer: Attempt to add a layout to a widget 'MainWindow' (GooeyQMainWindow) which already has a layout of non-box type QMainWindowLayout.
This indicates an inconsistency in the ui-file.
[ERROR ] Could not locate widget cmdTab (QWidget) (RuntimeError)
The latter can be circumvented by manually and temporarilly patching the UI file with this
diff --git a/datalad_gooey/resources/ui/main_window.ui b/datalad_gooey/resources/ui/main_window.ui
index d20e388..0a8986b 100644
--- a/datalad_gooey/resources/ui/main_window.ui
+++ b/datalad_gooey/resources/ui/main_window.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
- <widget class="GooeyQMainWindow" name="MainWindow">
+ <widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
It should be possible to avoid subclassing QMainWindow
for the purpose of running a custom close event implementation. Here is the sketch:
It felt inconvenient to need to rescale header (columns) in the tree view each time and/or make window bigger. I guess there could be more geometries and states to store/restore but this is the main ones I felt need for.
I guess such functionality could become configurable, but as IMHO should be enabled by default for better UX decided to suggest hardcoded first.