Fix #2260 : Add dialog pulling main window to active workspace
Fix #2258 : Potential runtimeError when emiting event