Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hide irrelevant elements from Form and SVG dialogs
  • Loading branch information
YoannQDQ authored and nyalldawson committed May 12, 2023
1 parent bf3b11f commit ccc17b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgsformannotationdialog.cpp
Expand Up @@ -38,6 +38,13 @@ QgsFormAnnotationDialog::QgsFormAnnotationDialog( QgsMapCanvasAnnotationItem *it
mStackedWidget->addWidget( mEmbeddedWidget );
mStackedWidget->setCurrentWidget( mEmbeddedWidget );

// Form annotation can only be created from an ui file
// Mask the source radio button and the source text edit
mFileRadioButton->setChecked( true );
mFileRadioButton->hide();
mSourceRadioButton->hide();
mHtmlSourceTextEdit->hide();

if ( item && item->annotation() )
{
QgsFormAnnotation *annotation = static_cast< QgsFormAnnotation * >( item->annotation() );
Expand Down
7 changes: 7 additions & 0 deletions src/app/qgssvgannotationdialog.cpp
Expand Up @@ -41,6 +41,13 @@ QgsSvgAnnotationDialog::QgsSvgAnnotationDialog( QgsMapCanvasAnnotationItem *item
mStackedWidget->addWidget( mEmbeddedWidget );
mStackedWidget->setCurrentWidget( mEmbeddedWidget );

// SVG annotation can only be created from an svg file
// Mask the source radio button and the source text edit
mFileRadioButton->setChecked( true );
mFileRadioButton->hide();
mSourceRadioButton->hide();
mHtmlSourceTextEdit->hide();

if ( mItem && mItem->annotation() )
{
QgsSvgAnnotation *annotation = static_cast< QgsSvgAnnotation * >( mItem->annotation() );
Expand Down

0 comments on commit ccc17b9

Please sign in to comment.