update correctly the layouts list in cmbbox

pull/1/head
Michail Vourlakos 8 years ago
parent b6352c587d
commit e0b7c9f322

@ -75,8 +75,19 @@ PlasmaComponents.Page {
Component.onCompleted: loadLayouts();
Connections {
target:layoutManager
onMenuLayoutsChanged: layoutCmb.loadLayouts();
}
function loadLayouts(){
layouts = layoutManager.menuLayouts;
layoutTexts = [];
//if current layout isnt at the menu layouts
if (layouts.indexOf(layoutManager.currentLayoutName) === -1) {
layoutTexts.push( "✔ "+layoutManager.currentLayoutName);
}
var activeLayout = 0;

Loading…
Cancel
Save