Commit c2d88cc5d1acd15886e823fc533ad9ff2a3d96ee
1 parent
419a700b
Exists in
master
and in
55 other branches
Fix instant plot
Showing
1 changed file
with
7 additions
and
29 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... | ... | @@ -1762,23 +1762,9 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
1762 | 1762 | |
1763 | 1763 | private function unmarshallInstant($input, $plotInput) |
1764 | 1764 | { |
1765 | - //Find current tab | |
1766 | - $crtTab = NULL; | |
1767 | - foreach ($plotInput->{'tabs'} as $tab) | |
1768 | - { | |
1769 | - if ($input->{'tabId'} == PLOT_RESULT_FILE_KEY."_".$tab->{'id'}) | |
1770 | - { | |
1771 | - $crtTab = $tab; | |
1772 | - break; | |
1773 | - } | |
1774 | - } | |
1775 | - | |
1776 | - if (!$crtTab) | |
1777 | - throw new Exception('Cannot retrieve plot tab for instant plot.'); | |
1778 | - | |
1779 | 1765 | //Find current panel |
1780 | 1766 | $crtPanel = NULL; |
1781 | - foreach ($crtTab->{'panels'} as $panel) | |
1767 | + foreach ($plotInput->{'panels'} as $panel) | |
1782 | 1768 | { |
1783 | 1769 | if ($input->{'panelId'} == $panel->{'id'}) |
1784 | 1770 | { |
... | ... | @@ -1843,20 +1829,15 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
1843 | 1829 | "file-format" => "PNG", |
1844 | 1830 | "file-output" => "INTERACTIVE", |
1845 | 1831 | "file-prefix" => "instant", |
1846 | - "last-plotted-tab"=> 1, | |
1847 | 1832 | "timesrc" => "Interval", |
1848 | 1833 | "startDate" => date("Y-m-dTH:i:s", $timeStamp - 3600), |
1849 | 1834 | "stopDate" => date("Y-m-dTH:i:s", $timeStamp + 3600), |
1850 | - "tabs" => array() | |
1851 | - ); | |
1852 | - | |
1853 | - $instantTab = (Object)array( | |
1854 | 1835 | "id" => 1, |
1855 | - "page-margins-activated" => $crtTab->{"page-margins-activated"}, | |
1856 | - "page-margin-x" => $crtTab->{"page-margin-x"}, | |
1857 | - "page-margin-y" => $crtTab->{"page-margin-y"}, | |
1858 | - "page-orientation" => $crtTab->{"page-orientation"}, | |
1859 | - "page-dimension" => $crtTab->{"page-dimension"}, | |
1836 | + "page-margins-activated" => $plotInput->{"page-margins-activated"}, | |
1837 | + "page-margin-x" => $plotInput->{"page-margin-x"}, | |
1838 | + "page-margin-y" => $plotInput->{"page-margin-y"}, | |
1839 | + "page-orientation" => $plotInput->{"page-orientation"}, | |
1840 | + "page-dimension" => $plotInput->{"page-dimension"}, | |
1860 | 1841 | "page-layout-type" => "vertical", |
1861 | 1842 | "page-layout-object" => (Object)array( |
1862 | 1843 | "layout-expand" => true, |
... | ... | @@ -1905,10 +1886,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
1905 | 1886 | ); |
1906 | 1887 | $instantPanel->{"params"}[] = $instantParam; |
1907 | 1888 | |
1908 | - $instantTab->{"panels"}[] = $instantPanel; | |
1909 | - | |
1910 | - $instantPlotInput->{"tabs"}[] = $instantTab; | |
1911 | - | |
1889 | + $instantPlotInput->{"panels"}[] = $instantPanel; | |
1912 | 1890 | |
1913 | 1891 | return $instantPlotInput; |
1914 | 1892 | } |
... | ... |