on xenial help sign in
break the possible endless loop \o/
commitc5e65a01040b0cdf8f0619146d1a8c7c9a3da2c8 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 30 Sep 2016, 12:54 (10 years ago) parent82925fd
1 file changed+8−8
qml/Components/KeymapSwitcher.qml+8−8
qml/Components/KeymapSwitcher.qml+8−8
@@ -48,6 +48,9 @@ QtObject {
4848 nextIndex = currentKeymapIndex + 1;
4949 }
5050 currentKeymapIndex = nextIndex;
51+ if (actionGroup.currentAction.valid) {
52+ actionGroup.currentAction.updateState(currentKeymapIndex);
53+ }
5154 }
5255
5356 function previousKeymap() {
@@ -57,6 +60,9 @@ QtObject {
5760 prevIndex = currentKeymapIndex - 1;
5861 }
5962 currentKeymapIndex = prevIndex;
63+ if (actionGroup.currentAction.valid) {
64+ actionGroup.currentAction.updateState(currentKeymapIndex);
65+ }
6066 }
6167
6268 property Binding surfaceKeymapBinding: Binding { // NB: needed mainly for xmir & libertine apps
@@ -77,18 +83,12 @@ QtObject {
7783 busName: "com.canonical.indicator.keyboard"
7884 objectPath: "/com/canonical/indicator/keyboard"
7985
80− property variant currentAction: action("current")
81− property variant activeAction: action("active")
86+ property variant currentAction: action("current") // the one that's checked by the indicator
87+ property variant activeAction: action("active") // the one that we clicked
8288
8389 Component.onCompleted: actionGroup.start();
8490 }
8591
86− onCurrentKeymapIndexChanged: {
87− if (actionGroup.currentAction.valid) {
88− actionGroup.currentAction.updateState(currentKeymapIndex);
89− }
90− }
91−
9292 readonly property int activeActionState: actionGroup.activeAction.valid ? actionGroup.activeAction.state : -1
9393
9494 onActiveActionStateChanged: {