Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SGS18-READEX
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Ondrej Vysocky
SGS18-READEX
Commits
0994ef19
Commit
0994ef19
authored
7 years ago
by
Ivo Peterek
Browse files
Options
Downloads
Patches
Plain Diff
FIX: combobox changing from xLabel to funcLabel in one combobox
#2
parent
41f4969c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
radarGUI.py
+10
-2
10 additions, 2 deletions
radarGUI.py
with
10 additions
and
2 deletions
radarGUI.py
+
10
−
2
View file @
0994ef19
# -*- coding: utf-8 -*-
import
csv
# Form implementation generated from reading ui file 'navrh.ui'
#
# Created by: PyQt5 UI code generator 5.7
...
...
@@ -7,9 +8,10 @@
# WARNING! All changes made in this file will be lost!
import
glob
import
os
import
csv
from
PyQt5
import
QtCore
,
QtGui
,
QtWidgets
class
Ui_TabWidget
(
object
):
def
__init__
(
self
):
self
.
current_labels_dic
=
{
'
xLabel
'
:
None
,
'
funcLabel
'
:
None
}
...
...
@@ -542,19 +544,25 @@ class Ui_TabWidget(object):
if
current_combo_box
.
currentText
()
in
[
'
xLabel
'
,
'
funcLabel
'
]:
if
self
.
current_labels_dic
[
current_combo_box
.
currentText
()]
!=
current_combo_box
:
tmp_key
=
None
if
current_combo_box
in
self
.
current_labels_dic
.
values
():
tmp_key
=
[
k
for
k
,
v
in
self
.
current_labels_dic
.
items
()
if
v
==
current_combo_box
][
0
]
self
.
current_labels_dic
[
tmp_key
]
=
None
self
.
current_labels_dic
[
current_combo_box
.
currentText
()]
=
current_combo_box
for
key
,
val
in
self
.
combobox_items_dic
.
items
():
if
key
==
current_combo_box
:
continue
act_label
=
key
.
currentText
()
if
tmp_key
is
not
None
:
self
.
combobox_items_dic
[
key
].
append
(
tmp_key
)
self
.
combobox_items_dic
[
key
].
remove
(
current_combo_box
.
currentText
())
key
.
clear
()
key
.
addItems
(
self
.
combobox_items_dic
[
key
])
key
.
setCurrentIndex
(
key
.
findText
(
act_label
))
#TODO: change from xLabel to funcLabel in one combobox
else
:
if
current_combo_box
in
self
.
current_labels_dic
.
values
():
add_item
=
None
for
key
,
val
in
self
.
current_labels_dic
.
items
():
if
val
==
current_combo_box
:
add_item
=
key
...
...
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