summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveMultiView.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2016-03-06 19:39:56 +0100
committerFabio Bas <ctrlaltca@gmail.com>2016-03-06 19:39:56 +0100
commitcc53959ac5ba3e786f3d6ad3403919b82c52fa42 (patch)
tree77e0b29f387cde1b380813f93a73a2c4aa16390e /framework/Web/UI/ActiveControls/TActiveMultiView.php
parentc7ab73d6448aad8aa630878fc83298b762505194 (diff)
Activecontrols: avoid updating client side if the value didn't change
Fix #399
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveMultiView.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveMultiView.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveMultiView.php b/framework/Web/UI/ActiveControls/TActiveMultiView.php
index 215706ec..45c137de 100644
--- a/framework/Web/UI/ActiveControls/TActiveMultiView.php
+++ b/framework/Web/UI/ActiveControls/TActiveMultiView.php
@@ -92,9 +92,11 @@ class TActiveMultiView extends TMultiView implements IActiveControl
*/
public function setActiveViewIndex($value)
{
- $old=parent::getActiveViewIndex();
+ if(parent::getActiveViewIndex() === $value)
+ return;
+
parent::setActiveViewIndex($value);
- if($this->getActiveControl()->canUpdateClientSide() && $old!=$value)
+ if($this->getActiveControl()->canUpdateClientSide())
$this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
}
@@ -104,9 +106,11 @@ class TActiveMultiView extends TMultiView implements IActiveControl
*/
public function setActiveView($value)
{
- $old=parent::getActiveView();
+ if(parent::getActiveView() === $value)
+ return;
+
parent::setActiveView($value);
- if($this->getActiveControl()->canUpdateClientSide() && $old!=$value)
+ if($this->getActiveControl()->canUpdateClientSide())
$this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
}
}