Fix regression w/Preview close button

Now it deselects the 1:1 button in the toolbar again.
This commit is contained in:
David Capello 2017-03-30 16:27:18 -03:00
parent 9d2e542b53
commit 855be8f05f

View File

@ -230,10 +230,10 @@ bool PreviewEditorWindow::onProcessMessage(ui::Message* msg)
void PreviewEditorWindow::onClose(ui::CloseEvent& ev)
{
Button* closeButton = dynamic_cast<Button*>(ev.getSource());
ButtonBase* closeButton = dynamic_cast<ButtonBase*>(ev.getSource());
if (closeButton &&
closeButton->type() == kWindowCloseButtonWidget) {
// Here we don't use "setMiniEditorEnabled" to change the state of
// Here we don't use "setPreviewEnabled" to change the state of
// "m_isEnabled" because we're coming from a close event of the
// window.
m_isEnabled = false;