mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-28 18:56:32 +02:00
Mining: save selected dropdown index
This commit is contained in:
parent
2e2ae5c88f
commit
8229979cec
2
main.qml
2
main.qml
@ -1394,6 +1394,8 @@ ApplicationWindow {
|
|||||||
property bool allow_p2pool_mining : false
|
property bool allow_p2pool_mining : false
|
||||||
property bool allowRemoteNodeMining : false
|
property bool allowRemoteNodeMining : false
|
||||||
property bool miningIgnoreBattery : true
|
property bool miningIgnoreBattery : true
|
||||||
|
property int miningModeSelected: 0
|
||||||
|
property int chainDropdownSelected: 0
|
||||||
property var nettype: NetworkType.MAINNET
|
property var nettype: NetworkType.MAINNET
|
||||||
property int restore_height : 0
|
property int restore_height : 0
|
||||||
property bool is_trusted_daemon : false // TODO: drop after v0.17.2.0 release
|
property bool is_trusted_daemon : false // TODO: drop after v0.17.2.0 release
|
||||||
|
@ -121,10 +121,11 @@ Rectangle {
|
|||||||
Layout.maximumWidth: 200
|
Layout.maximumWidth: 200
|
||||||
id: miningModeDropdown
|
id: miningModeDropdown
|
||||||
visible: true
|
visible: true
|
||||||
currentIndex: 0
|
currentIndex: persistentSettings.miningModeSelected
|
||||||
dataModel: miningModeModel
|
dataModel: miningModeModel
|
||||||
onChanged: {
|
onChanged: {
|
||||||
persistentSettings.allow_p2pool_mining = miningModeDropdown.currentIndex === 1;
|
persistentSettings.allow_p2pool_mining = miningModeDropdown.currentIndex === 1;
|
||||||
|
persistentSettings.miningModeSelected = miningModeDropdown.currentIndex;
|
||||||
walletManager.stopMining();
|
walletManager.stopMining();
|
||||||
p2poolManager.exit();
|
p2poolManager.exit();
|
||||||
}
|
}
|
||||||
@ -423,8 +424,9 @@ Rectangle {
|
|||||||
Layout.maximumWidth: 200
|
Layout.maximumWidth: 200
|
||||||
id: chainDropdown
|
id: chainDropdown
|
||||||
visible: persistentSettings.allow_p2pool_mining
|
visible: persistentSettings.allow_p2pool_mining
|
||||||
currentIndex: 0
|
currentIndex: persistentSettings.chainDropdownSelected
|
||||||
dataModel: chainModel
|
dataModel: chainModel
|
||||||
|
onChanged: persistentSettings.chainDropdownSelected = chainDropdown.currentIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user