Skip to content

Commit

Permalink
feat(iv): split off the current image in iv into a separate window - …
Browse files Browse the repository at this point in the history
…fix formatting

Signed-off-by: Anton Dukhovnikov <antond@wetafx.co.nz>
  • Loading branch information
antond-weta committed Oct 19, 2023
1 parent 90842d1 commit 52f3b4d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/iv/imageviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ ImageViewer::ImageViewer()
setWindowTitle(tr("Image Viewer"));
resize(m_default_width, m_default_height);
// setSizePolicy (QSizePolicy::Ignored, QSizePolicy::Ignored);

setAttribute(Qt::WA_DeleteOnClose);
}

Expand Down Expand Up @@ -194,7 +194,7 @@ ImageViewer::createActions()
saveSelectionAsAct = new QAction(tr("Save Selection As..."), this);
connect(saveSelectionAsAct, SIGNAL(triggered()), this,
SLOT(saveSelectionAs()));

moveToNewWindowAct = new QAction(tr("Move to new window"), this);
connect(moveToNewWindowAct, SIGNAL(triggered()), this,
SLOT(moveToNewWindow()));
Expand Down Expand Up @@ -876,10 +876,9 @@ ImageViewer::saveSelectionAs()
void
ImageViewer::moveToNewWindow()
{
if (m_images.size())
{
if (m_images.size()) {
ImageViewer* imageViewer = new ImageViewer();

imageViewer->show();
imageViewer->rawcolor(rawcolor());
imageViewer->add_image(m_images[m_current_image]->name());
Expand Down

0 comments on commit 52f3b4d

Please sign in to comment.