Skip to content

Commit

Permalink
Fix OMEdit crashes on close with animation window (#11693)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotheruserofgithub committed Dec 7, 2023
1 parent 901e52a commit 62905fd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions OMEdit/OMEditLIB/MainWindow.cpp
Expand Up @@ -3624,9 +3624,12 @@ void MainWindow::messagesTabBarClicked(int index)
*/
void MainWindow::messagesDockWidgetVisibilityChanged(bool visible)
{
mpMessagesTabWidget->setVisible(!visible);
if (!visible && MessagesWidget::instance()) {
mpMessagesTabWidget->setCurrentIndex(MessagesWidget::instance()->getMessagesTabWidget()->currentIndex());
// Avoid firing a paint event on the animation window when the main window is closing
if (MessagesWidget::instance()) {
mpMessagesTabWidget->setVisible(!visible);
if (!visible) {
mpMessagesTabWidget->setCurrentIndex(MessagesWidget::instance()->getMessagesTabWidget()->currentIndex());
}
}
}

Expand Down

0 comments on commit 62905fd

Please sign in to comment.