That sounds reasonable. I've committed the fix.

Thanks
Utkarsh

On Tue, Sep 7, 2010 at 10:18 PM, Takuya OSHIMA
<[email protected]> wrote:
> Hi,
>
> Before a commit on yesterday
>
> commit 35f842cbf94964f567158fa5ebfde62249c354f0
> Author: Utkarsh Ayachit <[email protected]>
> Date:   Tue Sep 7 09:41:35 2010 -0400
>
>    Adding support for a hint to specify the default "FileName" property.
>
> the show hint to FileName property had been respected, i.e. if I write
> in the SM-XML
>  <Hints>
>    <Property name="FileName" show="1"/>
>  </Hints>
> the property appeared on the GUI reader panel even if it was the first
> file property (and I could see that there had been an explicit logic
> to check propertiesToShow). However after the commit it is no longer
> effective. Can the previous behavior be retrieved, by e. g. the
> following modification?
>
> Takuya
>
> Takuya OSHIMA, Ph.D.
> Faculty of Engineering, Niigata University
> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>
> diff --git a/Qt/Components/pqNamedWidgets.cxx 
> b/Qt/Components/pqNamedWidgets.cxx
> index 12c53d1..7fb0f6c 100644
> --- a/Qt/Components/pqNamedWidgets.cxx
> +++ b/Qt/Components/pqNamedWidgets.cxx
> @@ -699,13 +699,6 @@ static void processHints(QGridLayout* panelLayout,
>     propertiesToHide.push_back(pname);
>     }
>
> -  // Skip the filename property.
> -  QString filenameProperty = 
> pqObjectBuilder::getFileNamePropertyName(smProxy);
> -  if (!filenameProperty.isEmpty())
> -    {
> -    propertiesToHide.push_back(filenameProperty);
> -    }
> -
>   // Get the hints for this proxy.
>   // The hints may contain stuff about property groupping/layout
>   // etc etc.
> @@ -855,6 +848,14 @@ void pqNamedWidgets::createWidgets(QGridLayout* 
> panelLayout, vtkSMProxy* pxy)
>   QStringList propertiesToHide;
>   QStringList propertiesToShow;
>   processHints(panelLayout, pxy, propertiesToHide, propertiesToShow);
> +
> +  // Skip the filename property if it is not a property to show.
> +  QString filenameProperty = pqObjectBuilder::getFileNamePropertyName(pxy);
> +  if (!filenameProperty.isEmpty() && 
> !propertiesToShow.contains(filenameProperty))
> +    {
> +    propertiesToHide.push_back(filenameProperty);
> +    }
> +
>   rowCount = panelLayout->rowCount();
>   for(iter->Begin(); !iter->IsAtEnd(); iter->Next())
>     {
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: 
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to