mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-30 05:09:12 -07:00
starting prusaslicer from gcode viewer and vice versa, by menus or by stl drop on icon. Bring gcode viewer forward after start.
This commit is contained in:
@@ -20,6 +20,13 @@
|
||||
-(void)message_update:(NSNotification *)msg
|
||||
{
|
||||
//NSLog(@"recieved msg %@", msg);
|
||||
[self bring_forward];
|
||||
//pass message
|
||||
Slic3r::GUI::wxGetApp().other_instance_message_handler()->handle_message(std::string([msg.userInfo[@"data"] UTF8String]));
|
||||
}
|
||||
|
||||
-(void) bring_forward
|
||||
{
|
||||
//demiaturize all windows
|
||||
for(NSWindow* win in [NSApp windows])
|
||||
{
|
||||
@@ -30,8 +37,6 @@
|
||||
}
|
||||
//bring window to front
|
||||
[[NSApplication sharedApplication] activateIgnoringOtherApps : YES];
|
||||
//pass message
|
||||
Slic3r::GUI::wxGetApp().other_instance_message_handler()->handle_message(std::string([msg.userInfo[@"data"] UTF8String]));
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -67,6 +72,13 @@ void OtherInstanceMessageHandler::unregister_for_messages()
|
||||
NSLog(@"warning: unregister instance InstanceCheck notifications not required");
|
||||
}
|
||||
}
|
||||
|
||||
void OtherInstanceMessageHandler::bring_instance_forward()
|
||||
{
|
||||
if (m_impl_osx) {
|
||||
[m_impl_osx bring_forward];
|
||||
}
|
||||
}
|
||||
}//namespace GUI
|
||||
}//namespace Slicer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user