Fix tab order in new window

Julien LepillerTue Aug 27 19:21:28+0200 2019

b24a336

Fix tab order in new window

CHANGELOG

88
* When an error occurs while fetching a project, an error message is shown and
99
  the new project window re-opens with the same details as before
1010
11+
=== UI Changes ===
12+
13+
* Fix tabulation order when creating and editing project settings
14+
* Add missing icon to the build result
15+
1116
=== Bug fixes ===
1217
1318
* Correctly pass application version to the gettext format
1419
* When editing a project, system specific fields were not shown
1520
* Unsupported formats raises a specific exception that can be caught by the UI
16-
* Add missing icon to the build result
1721
* Stop crashing when an error occurs during project fetching
1822
1923
Changes since 0.2

offlate/ui/new.py

7575
        self.langWidget.textChanged.connect(self.modify)
7676
7777
        hhbox = QHBoxLayout()
78-
        cancel = QPushButton(self.tr("Cancel"))
78+
        self.cancelbutton = QPushButton(self.tr("Cancel"))
7979
        self.okbutton = QPushButton(self.tr("OK"))
8080
        self.okbutton.setEnabled(False)
81-
        hhbox.addWidget(cancel)
81+
        hhbox.addWidget(self.cancelbutton)
8282
        hhbox.addWidget(self.okbutton)
8383
        contentbox.addWidget(formbox)
8484
        contentbox.addLayout(hhbox)

117117
        self.setLayout(hbox)
118118
119119
        self.predefinedprojects.currentItemChanged.connect(self.fill)
120-
        cancel.clicked.connect(self.close)
120+
        self.cancelbutton.clicked.connect(self.close)
121121
        self.okbutton.clicked.connect(self.ok)
122122
        self.searchfield.textChanged.connect(self.filter)
123123
        self.combo.currentIndexChanged.connect(self.othersystem)

188188
                widget['widget'].hide()
189189
                widget['label'].hide()
190190
        self.formLayout.invalidate()
191+
        oldwidget = self.combo
191192
        for widget in self.additionalFields[self.combo.currentIndex()]:
193+
            self.setTabOrder(oldwidget, widget['widget'])
194+
            oldwidget = widget['widget']
192195
            self.formLayout.addRow(widget['label'], widget['widget'])
193196
            widget['widget'].show()
194197
            widget['label'].show()
198+
        self.setTabOrder(oldwidget, self.cancelbutton)
199+
        self.setTabOrder(self.cancelbutton, self.okbutton)
195200
        self.modify()