コード例 #1
0
ファイル: thumbnailpanel.cpp プロジェクト: S1cko/Pixer
void ThumbnailPanel::thumbZoomOut()
{
	int tmp = zoomSlider->value();
	qDebug() << tmp<<tmp*1.1;
	zoomSlider->setValue(zoomSlider->value() * 1.1);
	if (zoomSlider->value() - tmp == 0 )
	{
		zoomSlider->setValue(zoomSlider->value() + 1);
	}
	zoomValueChanged(zoomSlider->value());
}
コード例 #2
0
ファイル: resultwidget.cpp プロジェクト: ukoethe/simple-STORM
ResultWidget::ResultWidget(QWidget *parent)
: QWidget(parent), m_ui(new Ui::ResultWidget()), m_functor(0), m_worker(0), m_coordinatesSaved(false), m_reconstructionSaved(false), m_autoZoom(true), m_minZoom(10), m_maxZoom(500), m_zoomStep(10), m_zoomPageStep(5 * m_zoomStep)
{
    m_ui->setupUi(this);
#ifdef Q_WS_X11
    m_ui->btn_abort->setIcon(QIcon::fromTheme("dialog-cancel"));
    m_ui->btn_save->setIcon(QIcon::fromTheme("document-save"));
    m_ui->btn_scaleToFit->setIcon(QIcon::fromTheme("zoom-fit-best"));
    m_ui->btn_zoomIn->setIcon(QIcon::fromTheme("zoom-in"));
    m_ui->btn_zoomOut->setIcon(QIcon::fromTheme("zoom-out"));
#else
    m_ui->btn_abort->setIcon(QIcon(":/dialog-cancel.svgz"));
    m_ui->btn_save->setIcon(QIcon(":/document-save.svgz"));
    m_ui->btn_scaleToFit->setIcon(QIcon(":/zoom-fit-best.svgz"));
    m_ui->btn_zoomIn->setIcon(QIcon(":/zoom-in.svgz"));
    m_ui->btn_zoomOut->setIcon(QIcon(":/zoom-out.svgz"));
#endif
    m_ui->btn_abort->setVisible(false);
    m_ui->btn_save->setVisible(false);
    m_ui->progressBar->setVisible(false);
    setPreviewEnabled(false);
    m_ui->sldr_zoom->setMinimum(m_minZoom);
    m_ui->sldr_zoom->setMaximum(m_maxZoom);
    m_ui->sldr_zoom->setSingleStep(m_zoomStep);
    m_ui->sldr_zoom->setPageStep(m_zoomPageStep);
    m_ui->spn_zoom->setMinimum(m_minZoom);
    m_ui->spn_zoom->setMaximum(m_maxZoom);
    m_ui->scrl_preview->setMinScale(m_minZoom / 100.);
    m_ui->scrl_preview->setMaxScale(m_maxZoom / 100.);
    m_ui->scrl_preview->setScaleStep(m_zoomStep / 100.);
    m_ui->preview->setIntensityScaleFactor(0.1f);
    connect(m_ui->btn_zoomIn, SIGNAL(clicked()), m_ui->scrl_preview, SLOT(zoomIn()));
    connect(m_ui->btn_zoomOut, SIGNAL(clicked()), m_ui->scrl_preview, SLOT(zoomOut()));
    connect(m_ui->btn_scaleToFit, SIGNAL(clicked()), m_ui->scrl_preview, SLOT(autoZoom()));
    connect(m_ui->spn_zoom, SIGNAL(editingFinished()), this, SLOT(zoomValueChanged()));
    connect(m_ui->sldr_zoom, SIGNAL(sliderMoved(int)), this, SLOT(zoomSliderValueChanged(int)));
    connect(m_ui->sldr_zoom, SIGNAL(actionTriggered(int)), this, SLOT(zoomSliderActionTriggered(int)));
    connect(m_ui->scrl_preview, SIGNAL(scaleChanged(float, bool)), this, SLOT(scaleChanged(float, bool)));
}
コード例 #3
0
ファイル: file_reload.cpp プロジェクト: tcvicio/PGE-Project
//Reload opened file data
void MainWindow::on_actionReload_triggered()
{
    if(_is_reloading) return;
    _is_reloading=true;
    BoolReseter rst(&_is_reloading);
    Q_UNUSED(rst);

    QString filePath;
    QRect wnGeom;

    if (activeChildWindow()==1)
    {
        LevelData FileData;
        filePath = activeLvlEditWin()->curFile;

        if(activeLvlEditWin()->isUntitled)
        {
                    QMessageBox::warning(this, tr("File not saved"),
                    tr("File doesn't saved on disk."), QMessageBox::Ok);
                        return;
        }

        if (!QFileInfo(filePath).exists() ) {
            QMessageBox::critical(this, tr("File open error"),
            tr("Can't open the file.\nFile not exist."), QMessageBox::Ok);
                return;
        }

        if(activeLvlEditWin()->LvlData.modified)
        {
            QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Reload file and custom stuff"),
            tr("Do you want to save before reload stuff?"), QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel);
            if((ret==QMessageBox::Cancel)||(ret==0))
                return;
            else
              if(ret==QMessageBox::Yes)
                save();
        }

        //Open level file
        FileData = FileFormats::OpenLevelFile(filePath);

        if( !FileData.ReadFileValid ){
            statusBar()->showMessage(tr("Reloading error"), 2000);
            return;}

        FileData.playmusic = GlobalSettings::autoPlayMusic;
        activeLvlEditWin()->LvlData.modified = false;

        QFile file(filePath+".meta");
        if(QFileInfo(filePath+".meta").exists())
        {
            if (file.open(QIODevice::ReadOnly))
            {
                QString metaRaw;
                QTextStream meta(&file);
                meta.setCodec("UTF-8");
                metaRaw = meta.readAll();
                if(FileData.metaData.script)
                {
                    delete FileData.metaData.script;
                    FileData.metaData.script = NULL;
                }
                FileData.metaData = FileFormats::ReadNonSMBX64MetaData(metaRaw, filePath+".meta");
            }
            else
            {
                QMessageBox::critical(this, tr("File open error"),
                tr("Can't open the file."), QMessageBox::Ok);
            }
        }

        //Remember last section ID and positions!
        int lastSection=0;
        QMap<int, QPair<long, long> > sectionPoss;
        lastSection = activeLvlEditWin()->LvlData.CurSection;
        SetCurrentLevelSection(lastSection);//Need to remember position of current section
        for(int i=0; i<activeLvlEditWin()->LvlData.sections.size(); i++)
        {
            LevelSection sct = activeLvlEditWin()->LvlData.sections[i];
            sectionPoss[sct.id]=QPair<long, long >(sct.PositionX, sct.PositionY);
        }

        activeLvlEditWin()->close();//Close old widget without closing of sub-window

        //Get pointer to current sub-window
        QMdiSubWindow *window = ui->centralWidget->activeSubWindow();

        //Get geometry of current subwindow
        wnGeom = ui->centralWidget->activeSubWindow()->geometry();
        //delete window->widget();
        LevelEdit *chLvlWin = new LevelEdit(window);
        connect(chLvlWin, SIGNAL(forceReload()), this, SLOT(on_actionReload_triggered()));
        window->setWidget(chLvlWin);
        GraphicsWorkspace* gr = static_cast<GraphicsWorkspace *>(chLvlWin->getGraphicsView());
        connect(gr, SIGNAL(zoomValueChanged(QString)), zoom, SLOT(setText(QString)));

        //ui->centralWidget->activeSubWindow()->close();
        LevelEdit *child = chLvlWin;//createLvlChild();
        LvlMusPlay::setNoMusic();
        setMusic(false);
        if ((bool) (child->loadFile(filePath, FileData, configs, GlobalSettings::LvlOpts)))
        {
            child->show();
            ui->centralWidget->activeSubWindow()->setGeometry(wnGeom);
            child->updateGeometry();
            child->ResetPosition();
            statusBar()->showMessage(tr("Level file reloaded"), 2000);
            LvlMusPlay::musicForceReset=true; //reset musics
            updateMenus(true);

            child->setFocus();
            //Restore saved section positions
            for(int i=0; i<child->LvlData.sections.size(); i++)
            {
                if(sectionPoss.contains(child->LvlData.sections[i].id))
                {
                    child->LvlData.sections[i].PositionX=sectionPoss[child->LvlData.sections[i].id].first;
                    child->LvlData.sections[i].PositionY=sectionPoss[child->LvlData.sections[i].id].second;
                }
            }

            SetCurrentLevelSection(lastSection);

            if(GlobalSettings::autoPlayMusic) ui->actionPlayMusic->setChecked(true);
        } else {
                WriteToLog(QtDebugMsg, ">>File loading aborted");
            child->show();
                WriteToLog(QtDebugMsg, ">>Window showed");
            if(activeChildWindow()==1) activeLvlEditWin()->LvlData.modified = false;
                WriteToLog(QtDebugMsg, ">>Option set");
            ui->centralWidget->activeSubWindow()->close();
                WriteToLog(QtDebugMsg, ">>Windows closed");
        }
    }
    else
    if (activeChildWindow()==2)
    {
        filePath = activeNpcEditWin()->curFile;
        QFile fileIn(filePath);

        if(activeNpcEditWin()->isUntitled)
        {
                    QMessageBox::warning(this, tr("File not saved"),
                    tr("File doesn't saved on disk."), QMessageBox::Ok);
                        return;
        }

        if(activeNpcEditWin()->isModyfied)
        {
            QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Reload file and custom stuff"),
            tr("Do you want to save before reload stuff?"), QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel);
            if((ret==QMessageBox::Cancel)||(ret==0))
                return;
            else
              if(ret==QMessageBox::Yes)
                save();
        }

        if (!fileIn.open(QIODevice::ReadOnly)) {
        QMessageBox::critical(this, tr("File open error"),
        tr("Can't open the file."), QMessageBox::Ok);
            return;
        }

        NPCConfigFile FileData = FileFormats::ReadNpcTXTFile(fileIn);
        if( !FileData.ReadFileValid ) return;
        wnGeom = ui->centralWidget->activeSubWindow()->geometry();
        activeNpcEditWin()->isModyfied = false;
        activeNpcEditWin()->close();
        //NpcEdit *child = createNPCChild();

        QMdiSubWindow *npcWindow = ui->centralWidget->activeSubWindow();
        NpcEdit *child = new NpcEdit(&configs, npcWindow);
        npcWindow->setWidget(child);

        if (child->loadFile(filePath, FileData)) {
            statusBar()->showMessage(tr("NPC Config reloaded"), 2000);
            child->show();
            ui->centralWidget->activeSubWindow()->setGeometry(wnGeom);
            updateMenus(true);
        } else {
            child->close();
            npcWindow->close();
        }
    }
    else
    if (activeChildWindow()==3)
    {
        WorldData FileData;
        filePath = activeWldEditWin()->curFile;

        if(activeWldEditWin()->isUntitled)
        {
                    QMessageBox::warning(this, tr("File not saved"),
                    tr("File doesn't saved on disk."), QMessageBox::Ok);
                        return;
        }

        if (!QFileInfo(filePath).exists() ) {
            QMessageBox::critical(this, tr("File open error"),
            tr("Can't open the file.\nFile not exist."), QMessageBox::Ok);
                return;
        }

        if(activeWldEditWin()->WldData.modified){
            QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Reload file and custom stuff"),
            tr("Do you want to save before reload stuff?"), QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel);
            if((ret==QMessageBox::Cancel)||(ret==0))
                return;
            else
              if(ret==QMessageBox::Yes)
                save();
        }

        FileData = FileFormats::OpenWorldFile(filePath);

        if( !FileData.ReadFileValid ){
            statusBar()->showMessage(tr("Reloading error"), 2000);
            return;}

        FileData.filename = QFileInfo(filePath).baseName();
        FileData.path = QFileInfo(filePath).absoluteDir().absolutePath();
        FileData.playmusic = GlobalSettings::autoPlayMusic;
        activeWldEditWin()->WldData.modified = false;

        QFile file(filePath+".meta");
        if(QFileInfo(filePath+".meta").exists())
        {
            if (file.open(QIODevice::ReadOnly))
            {
                QString metaRaw;
                QTextStream meta(&file);
                meta.setCodec("UTF-8");
                metaRaw = meta.readAll();
                FileData.metaData = FileFormats::ReadNonSMBX64MetaData(metaRaw, filePath+".meta");
            }
            else
            {
                QMessageBox::critical(this, tr("File open error"),
                tr("Can't open the file."), QMessageBox::Ok);
            }
        }

        wnGeom = ui->centralWidget->activeSubWindow()->geometry();
        QMdiSubWindow *worldWindow = ui->centralWidget->activeSubWindow();
        long posX = activeWldEditWin()->scene->_viewPort->horizontalScrollBar()->value();
        long posY = activeWldEditWin()->scene->_viewPort->verticalScrollBar()->value();

        activeWldEditWin()->close();

        WorldEdit *child = new WorldEdit(worldWindow);
        connect(child, SIGNAL(forceReload()), this, SLOT(on_actionReload_triggered()));
        worldWindow->setWidget(child);
        GraphicsWorkspace* gr = static_cast<GraphicsWorkspace *>(child->getGraphicsView());

        connect(gr, SIGNAL(zoomValueChanged(QString)), zoom, SLOT(setText(QString)));
        if ( (bool)(child->loadFile(filePath, FileData, configs, GlobalSettings::LvlOpts)) ) {
            child->show();
            ui->centralWidget->activeSubWindow()->setGeometry(wnGeom);
            child->updateGeometry();
            child->ResetPosition();
            updateMenus(true);
            dock_WldSettingsBox->setCurrentWorldSettings();
            if(FileData.HubStyledWorld)
            {
                dock_WldSettingsBox->setVisible(true);
                dock_WldSettingsBox->raise();
            }

            child->scene->_viewPort->horizontalScrollBar()->setValue(posX);
            child->scene->_viewPort->verticalScrollBar()->setValue(posY);

            statusBar()->showMessage(tr("World map file loaded"), 2000);
        } else {
            WriteToLog(QtDebugMsg, ">>File loading aborted");
            child->show();
            WriteToLog(QtDebugMsg, ">>Window showed");
            if(activeChildWindow()==3) activeWldEditWin()->WldData.modified = false;
            WriteToLog(QtDebugMsg, ">>Option set");
            ui->centralWidget->activeSubWindow()->close();
            WriteToLog(QtDebugMsg, ">>Windows closed");
        }

    }

    dock_LvlItemBox->clearFilter();
}
コード例 #4
0
ファイル: thumbnailpanel.cpp プロジェクト: S1cko/Pixer
void ThumbnailPanel::thumbZoomIn()
{
	zoomSlider->setValue(zoomSlider->value() * 0.9);
	zoomValueChanged(zoomSlider->value());
}
コード例 #5
0
ファイル: file_reload.cpp プロジェクト: jpmac26/PGE-Project
//Reload opened file data
void MainWindow::on_actionReload_triggered()
{
    if(m_isFileReloading) return;

    m_isFileReloading = true;
    BoolReseter rst(&m_isFileReloading);
    Q_UNUSED(rst);
    QString filePath;
    QRect wnGeom;
    int activeWindow = activeChildWindow(LastActiveSubWindow);

    if(activeWindow == WND_Level)
    {
        LevelEdit *lvlEdit = activeLvlEditWin(LastActiveSubWindow);
        LevelData FileData;
        filePath = lvlEdit->curFile;

        if(lvlEdit->isUntitled)
        {
            QMessageBox::warning(this, tr("File not saved"),
                                 tr("File doesn't saved on disk."), QMessageBox::Ok);
            return;
        }

        if(!QFileInfo(filePath).exists())
        {
            QMessageBox::critical(this, tr("File open error"),
                                  tr("Can't open the file!\nFile not exist."), QMessageBox::Ok);
            return;
        }

        if(lvlEdit->LvlData.meta.modified)
        {
            QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Reload file and custom stuff"),
                                              tr("Do you want to save before reload stuff?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);

            if((ret == QMessageBox::Cancel) || (ret == 0))
                return;
            else if(ret == QMessageBox::Yes)
                save();
        }

        //Open level file
        if(!FileFormats::OpenLevelFile(filePath, FileData))
        {
            formatErrorMsgBox(filePath, FileData.meta.ERROR_info, FileData.meta.ERROR_linenum, FileData.meta.ERROR_linedata);
            statusBar()->showMessage(tr("Reloading error"), 2000);
            return;
        }

        FileData.playmusic = GlobalSettings::autoPlayMusic;
        lvlEdit->LvlData.meta.modified = false;
        //Remember last section ID and positions!
        int lastSection = 0;
        QHash<int, QPair<long, long> > sectionPoss;
        lastSection = lvlEdit->LvlData.CurSection;
        SetCurrentLevelSection(lastSection); //Need to remember position of current section

        for(int i = 0; i < lvlEdit->LvlData.sections.size(); i++)
        {
            LevelSection sct = lvlEdit->LvlData.sections[i];
            sectionPoss[sct.id] = QPair<long, long >(sct.PositionX, sct.PositionY);
        }

        long posX = lvlEdit->scene->m_viewPort->horizontalScrollBar()->value();
        long posY = lvlEdit->scene->m_viewPort->verticalScrollBar()->value();
        lvlEdit->close();//Close old widget without closing of sub-window
        //Get geometry of current subwindow
        wnGeom = LastActiveSubWindow->geometry();
        //delete window->widget();
        LevelEdit *chLvlWin = new LevelEdit(this, LastActiveSubWindow);
        connect(chLvlWin, SIGNAL(forceReload()), this, SLOT(on_actionReload_triggered()));
        LastActiveSubWindow->setWidget(chLvlWin);
        GraphicsWorkspace *gr = static_cast<GraphicsWorkspace *>(chLvlWin->getGraphicsView());
        connect(gr, SIGNAL(zoomValueChanged(QString)), zoom, SLOT(setText(QString)));
        //LastActiveSubWindow->close();
        LevelEdit *child = chLvlWin;//createLvlChild();
        LvlMusPlay::setNoMusic();
        setMusic();

        if(static_cast<bool>(child->loadFile(filePath, FileData, configs, GlobalSettings::LvlOpts)))
        {
            child->show();
            LastActiveSubWindow->setGeometry(wnGeom);
            child->updateGeometry();
            child->ResetPosition();
            statusBar()->showMessage(tr("Level file reloaded"), 2000);
            LvlMusPlay::musicForceReset = true; //reset musics
            updateMenus(LastActiveSubWindow, true);
            child->setFocus();

            //Restore saved section positions
            for(int i = 0; i < child->LvlData.sections.size(); i++)
            {
                if(sectionPoss.contains(child->LvlData.sections[i].id))
                {
                    QPair<long, long> &sct = sectionPoss[child->LvlData.sections[i].id];
                    child->LvlData.sections[i].PositionX = sct.first;
                    child->LvlData.sections[i].PositionY = sct.second;
                }
            }

            SetCurrentLevelSection(lastSection);
            child->scene->m_viewPort->horizontalScrollBar()->setValue(static_cast<int>(posX));
            child->scene->m_viewPort->verticalScrollBar()->setValue(static_cast<int>(posY));

            if(GlobalSettings::autoPlayMusic)
                ui->actionPlayMusic->setChecked(true);

            child->showCustomStuffWarnings();
        }
        else
        {
            LogDebug(">>File loading aborted");
            LogDebug(">>Window showed");
            child->LvlData.meta.modified = false;
            LogDebug(">>Option set");
            LastActiveSubWindow->close();
            LogDebug(">>Windows closed");
        }
    }
    else if(activeWindow == WND_NpcTxt)
    {
        NpcEdit *npcEdit = activeNpcEditWin(LastActiveSubWindow);
        filePath = npcEdit->curFile;

        if(npcEdit->isUntitled)
        {
            QMessageBox::warning(this, tr("File not saved"),
                                 tr("File doesn't saved on disk."), QMessageBox::Ok);
            return;
        }

        if(npcEdit->isModyfied)
        {
            QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Reload file and custom stuff"),
                                              tr("Do you want to save before reload stuff?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);

            if((ret == QMessageBox::Cancel) || (ret == 0))
                return;
            else if(ret == QMessageBox::Yes)
                save();
        }

        //        if (!fileIn.open(QIODevice::ReadOnly)) {
        //        QMessageBox::critical(this, tr("File open error"),
        //        tr("Can't open the file!"), QMessageBox::Ok);
        //            return;
        //        }
        NPCConfigFile FileData;

        if(!FileFormats::ReadNpcTXTFileF(filePath, FileData))
        {
            QMessageBox::critical(this, QObject::tr("File open error"), tr("Can't read the file"), QMessageBox::Ok);
            return;
        }

        wnGeom = LastActiveSubWindow->geometry();
        npcEdit->isModyfied = false;
        npcEdit->close();
        //NpcEdit *child = createNPCChild();
        //QMdiSubWindow *npcWindow = LastActiveSubWindow;
        NpcEdit *child = new NpcEdit(&configs, LastActiveSubWindow);
        LastActiveSubWindow->setWidget(child);

        if(child->loadFile(filePath, FileData))
        {
            statusBar()->showMessage(tr("NPC Config reloaded"), 2000);
            child->show();
            LastActiveSubWindow->setGeometry(wnGeom);
            updateMenus(LastActiveSubWindow, true);
        }
        else
        {
            child->close();
            LastActiveSubWindow->close();
        }
    }
    else if(activeWindow == WND_World)
    {
        WorldEdit *wldEdit = activeWldEditWin(LastActiveSubWindow);
        WorldData FileData;
        filePath = wldEdit->curFile;

        if(wldEdit->isUntitled)
        {
            QMessageBox::warning(this, tr("File not saved"),
                                 tr("File doesn't saved on disk."), QMessageBox::Ok);
            return;
        }

        if(!QFileInfo(filePath).exists())
        {
            QMessageBox::critical(this, tr("File open error"),
                                  tr("Can't open the file!\nFile not exist."), QMessageBox::Ok);
            return;
        }

        if(wldEdit->WldData.meta.modified)
        {
            QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Reload file and custom stuff"),
                                              tr("Do you want to save before reload stuff?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);

            if((ret == QMessageBox::Cancel) || (ret == 0))
                return;
            else if(ret == QMessageBox::Yes)
                save();
        }

        if(!FileFormats::OpenWorldFile(filePath, FileData))
        {
            formatErrorMsgBox(filePath, FileData.meta.ERROR_info, FileData.meta.ERROR_linenum, FileData.meta.ERROR_linedata);
            statusBar()->showMessage(tr("Reloading error"), 2000);
            return;
        }

        QFileInfo finfo(filePath);
        FileData.meta.filename = util::getBaseFilename(finfo.fileName());
        FileData.meta.path = finfo.absoluteDir().absolutePath();
        FileData.playmusic = GlobalSettings::autoPlayMusic;
        wldEdit->WldData.meta.modified = false;
        wnGeom = LastActiveSubWindow->geometry();
        QMdiSubWindow *worldWindow = LastActiveSubWindow;
        long posX = wldEdit->scene->m_viewPort->horizontalScrollBar()->value();
        long posY = wldEdit->scene->m_viewPort->verticalScrollBar()->value();
        wldEdit->close();
        WorldEdit *child = new WorldEdit(this, worldWindow);
        connect(child, &WorldEdit::forceReload, this, &MainWindow::on_actionReload_triggered);
        worldWindow->setWidget(child);
        GraphicsWorkspace *gr = static_cast<GraphicsWorkspace *>(child->getGraphicsView());
        connect(gr, SIGNAL(zoomValueChanged(QString)), zoom, SLOT(setText(QString)));

        if(bool(child->loadFile(filePath, FileData, configs, GlobalSettings::LvlOpts)))
        {
            child->show();
            LastActiveSubWindow->setGeometry(wnGeom);
            child->updateGeometry();
            child->ResetPosition();
            updateMenus(LastActiveSubWindow, true);
            dock_WldSettingsBox->setCurrentWorldSettings();

            if(FileData.HubStyledWorld)
            {
                dock_WldSettingsBox->setVisible(true);
                dock_WldSettingsBox->raise();
            }

            child->scene->m_viewPort->horizontalScrollBar()->setValue(static_cast<int>(posX));
            child->scene->m_viewPort->verticalScrollBar()->setValue(static_cast<int>(posY));
            statusBar()->showMessage(tr("World map file loaded"), 2000);
            child->showCustomStuffWarnings();
        }
        else
        {
            LogDebug(">>File loading aborted");
            //child->show();
            LogDebug(">>Window showed");
            child->WldData.meta.modified = false;
            LogDebug(">>Option set");
            LastActiveSubWindow->close();
            LogDebug(">>Windows closed");
        }
    }

    dock_LvlItemBox->clearFilter();
}