Now PTBatcherGUI can open multiple files via the Finder.

Addition to the last post: If you find a better solution for the if 
condition, go ahead; adding yet another if statement around the inner if 
would make it
ever more unreadable.

Niklas

Am Donnerstag, 19. Mai 2016 21:38:49 UTC+2 schrieb Niklas Mischkulnig:
>
> Hi Thomas,
>
> this should fix the duplicate projects.
> If there is already a project in the queue the last time PTBatcher was 
> opened and Hugin adds a new one, then it starts to process immediately.
> If I add a second project via the finder, it doesn't do that.
>
> Niklas
>
>
> Am Donnerstag, 19. Mai 2016 20:28:36 UTC+2 schrieb T. Modes:
>>
>> Hi Niklas,
>>
>> Am Donnerstag, 19. Mai 2016 20:01:08 UTC+2 schrieb Niklas Mischkulnig:
>>>
>>>
>>> When Hugin called PTBatcher, it swapped the prefix and the project file. 
>>> PTBatcher tried to open the prefix and to save to the project file. See 
>>> Patch at 
>>> Working on the doubled project in PTBatcher...
>>>
>> Thanks. Committed the changes to PTBatcher.h|cpp and your patch to 
>> repository.
>>  
>>
>>>  
>>>
>>>> What's the main point for you against PTBatcher (or why prefer you 
>>>> hugin_stitch_project)?
>>>>
>>> If there is only one file you want to process, then hugin_stitch_project 
>>> would be better. But if there are several files 
>>> then of course PTBatcher. This isn't much of a problem for the end user. 
>>> Just tell him to open it manually via the file chooser.
>>>
>>
>> Thanks for explanation.
>>
>> Thomas
>>
>

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/ef093bc6-70ca-4e75-b17c-6fe16c620f38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/hugin1/ptbatcher/PTBatcherGUI.cpp b/src/hugin1/ptbatcher/PTBatcherGUI.cpp
--- a/src/hugin1/ptbatcher/PTBatcherGUI.cpp
+++ b/src/hugin1/ptbatcher/PTBatcherGUI.cpp
@@ -441,17 +443,19 @@
 }
 
 #ifdef __WXMAC__
-void PTBatcherGUI::MacOpenFile(const wxString& fileName)
+void PTBatcherGUI::MacOpenFiles(const wxArrayString &fileNames)
 {
     if(!m_frame)
     {
-        m_macFileNameToOpenOnStart = fileName;
+        //fallback, shouldn't happen
+        m_macFileNameToOpenOnStart = fileNames[0];
     }
     else
-    {
-        wxFileName fn(fileName);
-        m_frame->AddToList(fn.GetFullPath());
+    {   
+        for(int i = 0; i < fileNames.GetCount(); i++){
+            wxFileName fn(fileNames[i]);
+            m_frame->AddToList(fn.GetFullPath());
+        }
     }
 }
 #endif
diff --git a/src/hugin1/ptbatcher/PTBatcherGUI.h b/src/hugin1/ptbatcher/PTBatcherGUI.h
--- a/src/hugin1/ptbatcher/PTBatcherGUI.h
+++ b/src/hugin1/ptbatcher/PTBatcherGUI.h
@@ -107,7 +107,7 @@
 
 #ifdef __WXMAC__
     /** the wx calls this method when the app gets "Open file" AppleEvent */
-     void MacOpenFile(const wxString& fileName);
+    void MacOpenFiles(const wxArrayString &fileNames);
 #endif
 
 private:

Reply via email to