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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/hugin-ptx/1ef2f1f0-cac8-4358-ab5e-a8f1156f6458%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
@@ -220,10 +220,23 @@
return false;
}
};
+
+
+ #ifdef __WXMAC__
+ // see PTBatcherGUI::MacOpenFile for explanation
+ m_macFileNameToOpenOnStart = wxT("");
+ wxYield();
+ if(m_macFileNameToOpenOnStart != wxT(""))
+ {
+ wxFileName fn(m_macFileNameToOpenOnStart);
+ m_frame->AddToList(fn.GetFullPath());
+ }
+ #endif
+
//m_frame->SetLocaleAndXRC(&m_locale,m_xrcPrefix);
//projectsRunning=0;
unsigned int count = 0;
- if(parser.Found(wxT("a")))
+ if(parser.Found(wxT("a")) && !m_macFileNameToOpenOnStart.IsEmpty())
{
//added assistant files
while(parser.GetParamCount()>count)
@@ -249,7 +262,7 @@
};
};
}
- else
+ else if(!m_macFileNameToOpenOnStart.IsEmpty())
{
bool projectSpecified = false;
//we collect all parameters - all project files <and their output prefixes>
@@ -325,17 +338,6 @@
}
}
-#ifdef __WXMAC__
- // see PTBatcherGUI::MacOpenFile for explanation
- m_macFileNameToOpenOnStart = wxT("");
- wxYield();
- if(m_macFileNameToOpenOnStart != wxT(""))
- {
- wxFileName fn(m_macFileNameToOpenOnStart);
- m_frame->AddToList(fn.GetFullPath());
- }
-#endif
-
if(IsFirstInstance)
{
wxConfigBase* config=wxConfigBase::Get();
@@ -441,7 +443,6 @@
}
#ifdef __WXMAC__
-// wx calls this method when the app gets "Open file" AppleEvent
void PTBatcherGUI::MacOpenFile(const wxString& fileName)
{
if(!m_frame)