Fix screen stacking bug
You can no longer open a whole stack of Prefs windows, or Create Torrent windows Simplifies and fixes behavior when dropping files onto the app or the dock icon. Before, you could use drag-drop to create stacks of Create Torrent windows. Now, you can only create torrents from the home screen. Fixes #665
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
const {dispatch} = require('../lib/dispatcher')
|
||||
const State = require('../lib/state')
|
||||
const ipcRenderer = require('electron').ipcRenderer
|
||||
|
||||
@@ -16,11 +15,15 @@ module.exports = class PrefsController {
|
||||
url: 'preferences',
|
||||
setup: function (cb) {
|
||||
// initialize preferences
|
||||
dispatch('setTitle', 'Preferences')
|
||||
state.window.title = 'Preferences'
|
||||
state.unsaved = Object.assign(state.unsaved || {}, {prefs: state.saved.prefs || {}})
|
||||
ipcRenderer.send('setAllowNav', false)
|
||||
cb()
|
||||
},
|
||||
destroy: () => this.save()
|
||||
destroy: () => {
|
||||
ipcRenderer.send('setAllowNav', true)
|
||||
this.save()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user