Skip to content

Commit

Permalink
[annotations] Fix non-HTML formatted annotations losing content on se…
Browse files Browse the repository at this point in the history
…ttings change (fixes #59804)
  • Loading branch information
nirvn authored and nyalldawson committed Jan 30, 2025
1 parent fbd3ad6 commit 4dcf3b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsrichtexteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ QString QgsRichTextEditor::toHtml() const

void QgsRichTextEditor::editSource( bool enabled )
{
if ( enabled )
if ( enabled && mStackedWidget->currentIndex() == 0 )
{
mSourceEdit->setText( mTextEdit->toHtml() );
mStackedWidget->setCurrentIndex( 1 );
}
else
else if ( !enabled && mStackedWidget->currentIndex() == 1 )
{
mTextEdit->setHtml( mSourceEdit->text() );
mStackedWidget->setCurrentIndex( 0 );
Expand Down

0 comments on commit 4dcf3b4

Please sign in to comment.