On creating a new file, a call to Application::add_desktop() (a.k.a INKSCAPE.add_desktop()) is made setting the active desktop to the new desktop. However, a SPDesktopWidget::onFocusInEvent() happens before the panels are created. This sets the active desktop back to the old desktop. The panels are then created using the wrong desktop.
sp_file_new()/sp_file_open() calls
sp_create_window() which emits signal (win->show()) that calls
SPDesktop::onFocusInEvent() Sets desktop back to old desktop before above signal handled.
sp_desktop_widget_size_allocate() calls This is strange, why is it here?
SPDesktop->show_dialogs() calls
_dlg_mgr->showDialog for each dialog in Inkscape Dialog::getDialog() PanelDialog<B>::create() Panel::_init() Wrong desktop used!
Misc. Notes:
sp_namedview_window_from_document() calls SPDesktop->show_dialogs. On Linux this is blocked "due to gdl dock bug"
Application::active_desktop() a.k.a. SP_ACTIVE_DESKTOP: returns desktop at front of _desktops.
Application::add_desktop(SPDesktop * desktop) : inserts desktop into _desktops at front.
SPDesktopWidget::createInstance: calls Application::add_desktop a.k.a INKSCAPE.add_desktop
it also calls dtw->panels->setDesktop
Wicked!
On creating a new file, a call to Application: :add_desktop( ) (a.k.a INKSCAPE. add_desktop( )) is made setting the active desktop to the new desktop. However, a SPDesktopWidget ::onFocusInEven t() happens before the panels are created. This sets the active desktop back to the old desktop. The panels are then created using the wrong desktop.
sp_file_ open()/ sp_file_ new() calls widget_ new() calls et::createInsta nce() calls ::add_desktop( ) a.k.a INKSCAPE. add_desktop( )
sp_desktop_
SPDesktopWidg
Appllication
sp_file_ new()/sp_ file_open( ) calls
sp_create_window() which emits signal (win->show()) that calls
SPDesktop: :onFocusInEvent () Sets desktop back to old desktop before above signal handled.
sp_desktop_ widget_ size_allocate( ) calls This is strange, why is it here? >show_dialogs( ) calls mgr->showDialog for each dialog in Inkscape
Dialog: :getDialog( )
PanelDialog< B>::create( )
Panel: :_init( ) Wrong desktop used!
SPDesktop-
_dlg_
Misc. Notes:
sp_namedview_ window_ from_document( ) calls SPDesktop- >show_dialogs. On Linux this is blocked "due to gdl dock bug"
Application: :active_ desktop( ) a.k.a. SP_ACTIVE_DESKTOP: returns desktop at front of _desktops. :add_desktop( SPDesktop * desktop) : inserts desktop into _desktops at front.
Application:
SPDesktopWidget ::createInstanc e: calls Application: :add_desktop a.k.a INKSCAPE. add_desktop >setDesktop
it also calls dtw->panels-
SPDesktop::init(): sets calls DialogManager: :getInstance( )