Allow using multiple instances of the application window.
All instances share the same config file. Each instance can independently - work on a device - define its own stamps. They can work simultaneously.
This commit is contained in:
12
XS7.cpp
12
XS7.cpp
@@ -105,6 +105,18 @@ void XS7::OnAppKeyPressed(wxKeyEvent& evt)
|
||||
{
|
||||
if (evt.GetKeyCode() == 'Q')
|
||||
Close();
|
||||
// Create a new instance of the application window.
|
||||
if (evt.GetKeyCode() == 'N')
|
||||
{
|
||||
static int instanceId = 0;
|
||||
instanceId++;
|
||||
XS7 * instance = new XS7(nullptr, wxID_ANY);
|
||||
instance->Show(false);
|
||||
instance->Setup(m_config);
|
||||
const wxString title = instance->GetTitle() + _T(" (#") + to_string(instanceId) + _T(")");
|
||||
instance->SetTitle(title);
|
||||
instance->Show(true);
|
||||
}
|
||||
}
|
||||
if (evt.GetKeyCode() == WXK_ESCAPE)
|
||||
if (m_insaneWidget)
|
||||
|
||||
Reference in New Issue
Block a user