#12719 : improve behavior when changing layer selection

git-svn-id: file:///svn/Scribus/trunk/Scribus@19526 11d20701-8431-0410-a711-e3c959e3b870
some refactoring

git-svn-id: file:///svn/Scribus/trunk/Scribus@19529 11d20701-8431-0410-a711-e3c959e3b870