mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-26 08:37:08 +00:00
Fix bug with empty ContextBar when Ctrl+W is used to close a sprite and then a new sprite is created
This happens because Ctrl key activates the Hand/Move quick-tool, so the ContextBar is updated to shows controls for this tool (an empty context bar at the moment). Then, as Ctrl+W is pressed, the document is closed, (we lost the Editor), and we willn't receive a ContextBar::onCurrentToolChange() event (which should be generated by releasing Ctrl key).
This commit is contained in:
parent
78e5ab356a
commit
20393c8aaa
@ -28,6 +28,7 @@
|
||||
#include "app/ini_file.h"
|
||||
#include "app/load_widget.h"
|
||||
#include "app/modules/editors.h"
|
||||
#include "app/settings/settings.h"
|
||||
#include "app/ui/color_bar.h"
|
||||
#include "app/ui/context_bar.h"
|
||||
#include "app/ui/document_view.h"
|
||||
@ -229,6 +230,8 @@ void MainWindow::onActiveViewChange()
|
||||
if (DocumentView* docView = dynamic_cast<DocumentView*>(m_workspace->getActiveView())) {
|
||||
UIContext::instance()->setActiveView(docView);
|
||||
|
||||
m_contextBar->updateFromTool(UIContext::instance()
|
||||
->getSettings()->getCurrentTool());
|
||||
m_contextBar->setVisible(true);
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user