mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +00:00
Keep Undo History window position between sessions
This commit is contained in:
parent
6e35b0043f
commit
3da1a80b63
@ -17,6 +17,7 @@
|
|||||||
#include "app/document_access.h"
|
#include "app/document_access.h"
|
||||||
#include "app/document_undo.h"
|
#include "app/document_undo.h"
|
||||||
#include "app/document_undo_observer.h"
|
#include "app/document_undo_observer.h"
|
||||||
|
#include "app/modules/gui.h"
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "doc/context_observer.h"
|
#include "doc/context_observer.h"
|
||||||
#include "doc/documents_observer.h"
|
#include "doc/documents_observer.h"
|
||||||
@ -59,6 +60,8 @@ private:
|
|||||||
switch (msg->type()) {
|
switch (msg->type()) {
|
||||||
|
|
||||||
case ui::kOpenMessage:
|
case ui::kOpenMessage:
|
||||||
|
load_window_pos(this, "UndoHistory");
|
||||||
|
|
||||||
m_ctx->addObserver(this);
|
m_ctx->addObserver(this);
|
||||||
m_ctx->documents().addObserver(this);
|
m_ctx->documents().addObserver(this);
|
||||||
if (m_ctx->activeDocument()) {
|
if (m_ctx->activeDocument()) {
|
||||||
@ -68,6 +71,8 @@ private:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ui::kCloseMessage:
|
case ui::kCloseMessage:
|
||||||
|
save_window_pos(this, "UndoHistory");
|
||||||
|
|
||||||
if (m_document)
|
if (m_document)
|
||||||
detachDocument();
|
detachDocument();
|
||||||
m_ctx->documents().removeObserver(this);
|
m_ctx->documents().removeObserver(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user