Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_40] [georeferencer] Fix the layer -> georeferencer menu action when in dock panel mode #60401

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/app/georeferencer/qgsgeorefmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@ QgsGeoreferencerMainWindow::QgsGeoreferencerMainWindow( QWidget *parent, Qt::Win
}
}

void QgsGeoreferencerMainWindow::showGeoreferencer()
{
if ( mDock )
{
mDock->setUserVisible( true );
}
else
{
show();
setFocus();
}
}

void QgsGeoreferencerMainWindow::dockThisWindow( bool dock )
{
if ( mDock )
Expand Down
2 changes: 2 additions & 0 deletions src/app/georeferencer/qgsgeorefmainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class APP_EXPORT QgsGeoreferencerMainWindow : public QMainWindow, private Ui::Qg
QgsGeoreferencerMainWindow( QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
~QgsGeoreferencerMainWindow() override;

void showGeoreferencer();

protected:
void closeEvent( QCloseEvent * ) override;
void dropEvent( QDropEvent *event ) override;
Expand Down
5 changes: 3 additions & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,10 @@ void QgisApp::toggleEventTracing()
void QgisApp::showGeoreferencer()
{
if ( !mGeoreferencer )
{
mGeoreferencer = new QgsGeoreferencerMainWindow( this );
mGeoreferencer->show();
mGeoreferencer->setFocus();
}
mGeoreferencer->showGeoreferencer();
}
#endif

Expand Down
Loading