Hi Thomas,

yes, argv has size of 1 when opened via Finder
and with your change it works perfectly in both cases.
Great work! (Attached patch contains that and the color-change)

Niklas


Am Freitag, 27. Mai 2016 16:57:34 UTC+2 schrieb T. Modes:
>
> Hi Niklas,
>
> Am Donnerstag, 26. Mai 2016 22:42:05 UTC+2 schrieb Niklas Mischkulnig:
>>
>> What does OSXStoreOpenFiles do? With this code added, MacOpenFiles never 
>> gets called,
>>
>
> It should prevent the call to MacOpenFiles when we parsed all options 
> already in OnInit.
> What command line options gets PTBatcherGUI when you open it in finder 
> with a project? Is it empty (except argv[0])?
>
> Does it works when we add an if(argc>1) like
> #ifdef __WXMAC__
>     if(argc>1)
>     {
>          wxArrayString emptyFiles;
>          OSXStoreOpenFiles(emptyFiles);
>     } 
> #endif
>  
> see also attached patch.
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/b2742bf2-a3a2-4811-ab74-78c506bec726%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/hugin1/hugin/GLViewer.cpp b/src/hugin1/hugin/GLViewer.cpp
--- a/src/hugin1/hugin/GLViewer.cpp
+++ b/src/hugin1/hugin/GLViewer.cpp
@@ -386,7 +386,11 @@
     
     // we should use the window background colour outside the panorama
     // FIXME shouldn't this work on textured backrounds?
+#if defined __WXMAC__ && wxCHECK_VERSION(3,1,0) 
+    wxColour col(128,128,128);
+#else
     wxColour col = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
+#endif
     m_renderer->SetBackground(col.Red(), col.Green(), col.Blue());
     if (m_visualization_state->RequireRecalculateViewport())
     {
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
@@ -396,6 +396,13 @@
     {
         m_frame->RunBatch();
     }
+#ifdef __WXMAC__
+    if (argc > 1)
+    {
+        wxArrayString emptyFiles;
+        OSXStoreOpenFiles(emptyFiles);
+    };
+#endif
     return true;
 }
 

Reply via email to