Show correct user data after undo/redo and commit change immediately

This commit is contained in:
David Capello 2015-12-11 13:58:32 -03:00
parent eb6b57c5fb
commit f27836744f
2 changed files with 4 additions and 3 deletions

View File

@ -195,8 +195,9 @@ private:
void onPopupUserData() {
if (m_cel) {
m_userData = m_cel->data()->userData();
if (show_user_data_popup(userData()->bounds(), m_userData)) {
onStartTimer();
onCommitChange();
}
}
}

View File

@ -96,7 +96,6 @@ public:
}
void setLayer(LayerImage* layer) {
// Save uncommited changes
if (m_layer) {
document()->removeObserver(this);
m_layer = nullptr;
@ -233,8 +232,9 @@ private:
void onPopupUserData() {
if (m_layer) {
m_userData = m_layer->userData();
if (show_user_data_popup(userData()->bounds(), m_userData)) {
onStartTimer();
onCommitChange();
}
}
}