<div dir="ltr">I think there needs to be another fix. If I remember correctly, the setUseDirectoryMode() was added to support the use-case where the user selects a foo.bar file, but the ServerManager Property on the filter/reader is to be set to the containing directory for that file. I'll need to brush my memory a bit more to figure out which concrete use-case was this one (or if that's no longer the case). A quick search for "UseDirectoryName" hint in ServerManager xml didn't yield anything. Rob, does CMB use it?<div>
<br></div><div>Utkarsh</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 2, 2013 at 4:43 PM, Robert Maynard <span dir="ltr"><<a href="mailto:robert.maynard@kitware.com" target="_blank">robert.maynard@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Does it fail if you pass /tmp/? If you are in directory mode /tmp would need to first verify that tmp is a folder and not a file. </div>
<div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Jul 2, 2013 at 3:17 PM, Joshua Murphy <span dir="ltr"><<a href="mailto:Joshua.Murphy@lasp.colorado.edu" target="_blank">Joshua.Murphy@lasp.colorado.edu</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>
I figure it out.. In the file pqFileChooserWidget.cxx on line 99, the code is:</div>
<div><br></div><div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="color:#b933a1">this</span>->LineEdit->setText(QFileInfo(files[<span style="color:#2038d6">0</span>]).path());</p></div><div>
<br></div><div>To return the correct path, this would have to be:</div><div><br></div><div><p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo"><span style="color:#b933a1">this</span>->LineEdit->setText(QFileInfo(files[<span style="color:#2038d6">0</span>]).filePath());</p>
</div><div><br></div><div>I have made a copy of the widget and made this modification and it works correctly. Might someone make the change (baring any problems with this unbeknownst to me) in the master code so that it might work as expected?</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Josh</div><div><br></div><span><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span> Joshua Murphy <<a href="mailto:Joshua.Murphy@lasp.colorado.edu" target="_blank">Joshua.Murphy@lasp.colorado.edu</a>><br><span style="font-weight:bold">Date: </span> Tuesday, July 2, 2013 1:00 PM<br>
<span style="font-weight:bold">To: </span> "<a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.org</a>" <<a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.org</a>><br>
<span style="font-weight:bold">Subject: </span> [Paraview-developers] pqFileChooserWidget questions<br></div><div><div><div><br></div><div><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>Hello,</div><div><br></div><div>I am attempting to use pqFileChooserWidget to select a path for storing temp files in my properties panel, and I am having trouble.</div><div><br></div><div>I am using it as follows:</div>
<div><br></div><ol><li>create a custom property panel widget using a pqFileChooserWidget as the ui.</li><li>Set setUseDirectoryMode(true)</li></ol><div><br></div><div>When selecting a path, the following odd behavior occurs:</div>
<div><br></div><div>1) Select the path the I want</div><div>2) click OK</div><div>3) in the dialog, the path ONE STEP BELOW the selected path is displayed.</div><div><br></div><div>For example: if I select /tmp, the ui will show that / is selected. If I select /tmp/sc01a, the ui shows /tmp as selected.</div>
<div><br></div><div>Could someone provide some information on why this may be occurring?</div><div><br></div><div>Thanks,</div><div>Josh</div><div><br></div><div><div><div><div><img src="cid:BB706452-208C-4917-BA07-003A50DBD144" type="image/png"></div>
</div><div>Joshua J. Murphy</div><div>Computer Scientist</div><div>Laboratory for Atmospheric and Space Physics</div><div>University of Colorado, Boulder</div><div><br></div></div></div></div></div></div></div></span></div>
<br></div></div>_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org" target="_blank">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
<br></blockquote></div><br></div>