Qt: Merge "Save" and "OK" buttons in shader options
Vicki Pfau vi@endrift.com
Mon, 23 Jan 2017 22:18:14 -0800
3 files changed,
5 insertions(+),
20 deletions(-)
M
src/platform/qt/ShaderSelector.cpp
→
src/platform/qt/ShaderSelector.cpp
@@ -264,9 +264,10 @@ switch (m_ui.buttonBox->standardButton(button)) {
case QDialogButtonBox::Reset: emit reset(); break; - case QDialogButtonBox::Save: + case QDialogButtonBox::Ok: m_config->setOption("shader", m_shaderPath); emit saved(); + close(); break; case QDialogButtonBox::RestoreDefaults: emit resetToDefault();
M
src/platform/qt/ShaderSelector.ui
→
src/platform/qt/ShaderSelector.ui
@@ -104,29 +104,12 @@ <property name="orientation">
<enum>Qt::Horizontal</enum> </property> <property name="standardButtons"> - <set>QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save</set> + <set>QDialogButtonBox::Ok|QDialogButtonBox::Reset|QDialogButtonBox::RestoreDefaults</set> </property> </widget> </item> </layout> </widget> <resources/> - <connections> - <connection> - <sender>buttonBox</sender> - <signal>accepted()</signal> - <receiver>ShaderSelector</receiver> - <slot>close()</slot> - <hints> - <hint type="sourcelabel"> - <x>248</x> - <y>254</y> - </hint> - <hint type="destinationlabel"> - <x>157</x> - <y>274</y> - </hint> - </hints> - </connection> - </connections> + <connections/> </ui>