Skip to content

Commit

Permalink
Refs #8560. Fixed a widget naming issue
Browse files Browse the repository at this point in the history
The error was because the open dialog was parented to a control that had been renamed. Fixed naming issues
  • Loading branch information
keithnbrown committed Jan 21, 2014
1 parent 40adf77 commit 82a0fff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py
Expand Up @@ -401,7 +401,7 @@ def save(self, failsave = False):
if self.currentTable:
filename = self.currentTable
else:
saveDialog = QtGui.QFileDialog(self.layoutMainRow.parent(), "Save Table")
saveDialog = QtGui.QFileDialog(self.widgetMainRownRow.parent(), "Save Table")
saveDialog.setFileMode(QtGui.QFileDialog.AnyFile)
saveDialog.setNameFilter("Table Files (*.tbl);;All files (*.*)")
saveDialog.setDefaultSuffix("tbl")
Expand All @@ -412,7 +412,7 @@ def save(self, failsave = False):
return False
return self.saveTable(filename)
def saveAs(self):
saveDialog = QtGui.QFileDialog(self.layoutMainRow.parent(), "Save Table")
saveDialog = QtGui.QFileDialog(self.widgetMainRow.parent(), "Save Table")
saveDialog.setFileMode(QtGui.QFileDialog.AnyFile)
saveDialog.setNameFilter("Table Files (*.tbl);;All files (*.*)")
saveDialog.setDefaultSuffix("tbl")
Expand All @@ -422,7 +422,7 @@ def saveAs(self):
self.saveTable(filename)
def loadTable(self):
self.loading = True
loadDialog = QtGui.QFileDialog(self.layoutMainRow.parent(), "Open Table")
loadDialog = QtGui.QFileDialog(self.widgetMainRow.parent(), "Open Table")
loadDialog.setFileMode(QtGui.QFileDialog.ExistingFile)
loadDialog.setNameFilter("Table Files (*.tbl);;All files (*.*)")
if loadDialog.exec_():
Expand Down
12 changes: 6 additions & 6 deletions Code/Mantid/scripts/Interface/ui/reflectometer/refl_window.py
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'D:\mantid\windows\Code\Mantid\scripts\Interface\ui\reflectometer/refl_window.ui'
#
# Created: Wed Jan 08 16:11:40 2014
# Created: Tue Jan 21 14:34:54 2014
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
Expand All @@ -21,8 +21,8 @@ def setupUi(self, windowRefl):
windowRefl.setAcceptDrops(True)
self.widgetMainRow = QtGui.QWidget(windowRefl)
self.widgetMainRow.setObjectName(_fromUtf8("widgetMainRow"))
self.verticalLayout = QtGui.QVBoxLayout(self.widgetMainRow)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.layoutBase = QtGui.QVBoxLayout(self.widgetMainRow)
self.layoutBase.setObjectName(_fromUtf8("layoutBase"))
self.layoutTopRow = QtGui.QHBoxLayout()
self.layoutTopRow.setObjectName(_fromUtf8("layoutTopRow"))
self.labelInstrument = QtGui.QLabel(self.widgetMainRow)
Expand Down Expand Up @@ -65,7 +65,7 @@ def setupUi(self, windowRefl):
self.comboPolarCorrect.addItem(_fromUtf8(""))
self.comboPolarCorrect.addItem(_fromUtf8(""))
self.layoutTopRow.addWidget(self.comboPolarCorrect)
self.verticalLayout.addLayout(self.layoutTopRow)
self.layoutBase.addLayout(self.layoutTopRow)
self.layoutMidRow = QtGui.QHBoxLayout()
self.layoutMidRow.setSpacing(12)
self.layoutMidRow.setObjectName(_fromUtf8("layoutMidRow"))
Expand Down Expand Up @@ -102,7 +102,7 @@ def setupUi(self, windowRefl):
self.buttonAuto = QtGui.QPushButton(self.widgetMainRow)
self.buttonAuto.setObjectName(_fromUtf8("buttonAuto"))
self.layoutMidRow.addWidget(self.buttonAuto)
self.verticalLayout.addLayout(self.layoutMidRow)
self.layoutBase.addLayout(self.layoutMidRow)
self.layoutBottomRow = QtGui.QHBoxLayout()
self.layoutBottomRow.setObjectName(_fromUtf8("layoutBottomRow"))
self.listMain = QtGui.QListWidget(self.widgetMainRow)
Expand Down Expand Up @@ -193,7 +193,7 @@ def setupUi(self, windowRefl):
self.layoutTableButton.addWidget(self.buttonClear)
self.layoutTableColumn.addLayout(self.layoutTableButton)
self.layoutBottomRow.addLayout(self.layoutTableColumn)
self.verticalLayout.addLayout(self.layoutBottomRow)
self.layoutBase.addLayout(self.layoutBottomRow)
windowRefl.setCentralWidget(self.widgetMainRow)
self.menuBar = QtGui.QMenuBar(windowRefl)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 1000, 21))
Expand Down
10 changes: 1 addition & 9 deletions Code/Mantid/scripts/Interface/ui/reflectometer/refl_window.ui
Expand Up @@ -17,7 +17,7 @@
<string>ISIS Reflectometry</string>
</property>
<widget class="QWidget" name="widgetMainRow">
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="layoutBase">
<item>
<layout class="QHBoxLayout" name="layoutTopRow">
<item>
Expand Down Expand Up @@ -540,14 +540,6 @@
</item>
</layout>
<zorder></zorder>
<zorder>labelPolarCorrect</zorder>
<zorder>checkTickAll</zorder>
<zorder>buttonAuto</zorder>
<zorder>comboPolarCorrect</zorder>
<zorder>textRuns</zorder>
<zorder>labelRuns</zorder>
<zorder>comboInstrument</zorder>
<zorder>horizontalSpacer_2</zorder>
<zorder></zorder>
</widget>
<widget class="QMenuBar" name="menuBar">
Expand Down

0 comments on commit 82a0fff

Please sign in to comment.