Skip to content

Commit

Permalink
Fix OMEdit crashes on close with animation window (#11693) (#11698)
Browse files Browse the repository at this point in the history
Co-authored-by: anotheruserofgithub <96748782+anotheruserofgithub@users.noreply.github.com>
  • Loading branch information
adeas31 and anotheruserofgithub committed Dec 7, 2023
1 parent 0ca6420 commit f2dada8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions OMEdit/OMEditLIB/MainWindow.cpp
Original file line number Diff line number Diff line change
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 f2dada8

Please sign in to comment.