Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOHViewer
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Public
PASSOFT
SOHViewer
Commits
9a512221
You need to sign in or sign up before continuing.
Commit
9a512221
authored
1 year ago
by
Lan Dam
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into i166_fix_bug_in_create_multi_buttons_dialog
parents
10c9601a
dabab74e
No related branches found
Branches containing commit
No related tags found
2 merge requests
!190
let user select one of the folders data/, sdata/
,
!189
Fix return when user select Abort in multi button dialog
Pipeline
#3056
passed with stage
in 2 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/view/save_plot_dialog.py
+17
-6
17 additions, 6 deletions
sohstationviewer/view/save_plot_dialog.py
with
17 additions
and
6 deletions
sohstationviewer/view/save_plot_dialog.py
+
17
−
6
View file @
9a512221
...
...
@@ -48,7 +48,7 @@ class SavePlotDialog(QDialog):
if
fmt
==
self
.
main_window
.
save_plot_format
:
self
.
format_radio_btns
[
fmt
].
setChecked
(
True
)
self
.
cancel_btn
=
QtWidgets
.
QPushButton
(
'
CANCEL
'
,
self
)
self
.
continue
_btn
=
QtWidgets
.
QPushButton
(
'
SAVE PLOT
'
,
self
)
self
.
save_plot
_btn
=
QtWidgets
.
QPushButton
(
'
SAVE PLOT
'
,
self
)
self
.
setup_ui
()
self
.
connect_signals
()
...
...
@@ -77,12 +77,12 @@ class SavePlotDialog(QDialog):
rowidx
+=
1
main_layout
.
addWidget
(
self
.
cancel_btn
,
rowidx
,
1
,
1
,
1
)
main_layout
.
addWidget
(
self
.
continue
_btn
,
rowidx
,
3
,
1
,
1
)
main_layout
.
addWidget
(
self
.
save_plot
_btn
,
rowidx
,
3
,
1
,
1
)
def
connect_signals
(
self
)
->
None
:
self
.
save_dir_btn
.
clicked
.
connect
(
self
.
change_save_directory
)
self
.
cancel_btn
.
clicked
.
connect
(
self
.
close
)
self
.
continue
_btn
.
clicked
.
connect
(
self
.
on_continue
)
self
.
save_plot
_btn
.
clicked
.
connect
(
self
.
save_plot
)
@QtCore.Slot
()
def
change_save_directory
(
self
)
->
None
:
...
...
@@ -96,12 +96,12 @@ class SavePlotDialog(QDialog):
fd
.
exec
()
new_path
=
fd
.
selectedFiles
()[
0
]
self
.
save_dir_textbox
.
setText
(
new_path
)
self
.
save_dir_path
=
new_path
self
.
main_window
.
save_plot_dir
=
new_path
@QtCore.Slot
()
def
on_continue
(
self
):
if
self
.
save_dir_textbox
.
text
().
strip
()
==
''
:
def
save_plot
(
self
):
self
.
save_dir_path
=
self
.
save_dir_textbox
.
text
().
strip
()
if
self
.
save_dir_path
==
''
:
QtWidgets
.
QMessageBox
.
warning
(
self
,
"
Add Directory
"
,
"
A directory need to be given before continue.
"
)
...
...
@@ -121,6 +121,17 @@ class SavePlotDialog(QDialog):
self
.
save_file_path
=
Path
(
self
.
save_dir_path
).
joinpath
(
f
"
{
self
.
save_filename_textbox
.
text
()
}
.
{
save_format
}
"
)
if
not
os
.
access
(
self
.
save_dir_path
,
os
.
W_OK
):
self
.
save_file_path
=
None
QtWidgets
.
QMessageBox
.
information
(
self
,
"
No Write Permission
"
,
"
The directory to save file to doesn
'
t have Write Permission.
"
"
\n\n
Please change its permission or
"
"
select another directory.
"
)
return
self
.
dpi
=
self
.
dpi_line_edit
.
value
()
self
.
close
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment