Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayLimaye committed Aug 5, 2020
1 parent 04b4295 commit b0301a2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
10 changes: 7 additions & 3 deletions tools/paint/drishtipaint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ DrishtiPaint::DrishtiPaint(QWidget *parent) :
Global::setMainWindow(this);

ui.setupUi(this);
// ui.statusbar->setEnabled(true);
// ui.statusbar->setSizeGripEnabled(true);
ui.statusbar->hide();
ui.statusbar->setEnabled(true);
ui.statusbar->setSizeGripEnabled(true);
//ui.statusbar->hide();

setWindowIcon(QPixmap(":/images/drishti_paint_32.png"));
setWindowTitle(QString("DrishtiPaint v") + QString(DRISHTI_VERSION));
Expand Down Expand Up @@ -1645,12 +1645,16 @@ DrishtiPaint::setFile(QString filename)
Global::setVoxelUnit(StaticFunctions::getVoxelUnitFromHeader(m_pvlFile));
//----------------------------

((QMainWindow *)Global::mainWindow())->statusBar()->showMessage(QString("loading %1").arg(flnm));

if (m_volume->setFile(flnm) == false)
{
QMessageBox::critical(0, "Error", "Cannot load "+flnm);
return;
}

((QMainWindow *)Global::mainWindow())->statusBar()->showMessage(QString("%1").arg(flnm));


m_viewer->setVolDataPtr(m_volume->memVolDataPtr());
m_viewer->setMaskDataPtr(m_volume->memMaskDataPtr());
Expand Down
16 changes: 11 additions & 5 deletions tools/paint/filehandler.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "filehandler.h"

#include "blosc.h"
#include "global.h"

#include <QMainWindow>
#include <QMessageBox>


Expand Down Expand Up @@ -114,7 +116,9 @@ FileHandler::saveMemFile()
QMutexLocker locker(&m_mutex);

m_savingFile = true;


((QMainWindow *)Global::mainWindow())->statusBar()->showMessage("saving ...");

int nthreads, pnthreads;
nthreads = 4;
blosc_init();
Expand Down Expand Up @@ -179,6 +183,8 @@ FileHandler::saveMemFile()
delete [] vBuf;

m_savingFile = false;

((QMainWindow *)Global::mainWindow())->statusBar()->showMessage("");
}

void
Expand Down Expand Up @@ -218,7 +224,7 @@ FileHandler::saveDataBlock(int dmin, int dmax,
}

//-----------
saveMemFile();
if (!m_savingFile) saveMemFile();
return;
//-----------

Expand Down Expand Up @@ -270,7 +276,7 @@ void
FileHandler::saveDepthSlices(QList<int> slices)
{
//-----------
saveMemFile();
if (!m_savingFile) saveMemFile();
return;
//-----------

Expand Down Expand Up @@ -302,7 +308,7 @@ void
FileHandler::saveWidthSlices(QList<int> slices)
{
//-----------
saveMemFile();
if (!m_savingFile) saveMemFile();
return;
//-----------

Expand Down Expand Up @@ -333,7 +339,7 @@ void
FileHandler::saveHeightSlices(QList<int> slices)
{
//-----------
saveMemFile();
if (!m_savingFile) saveMemFile();
return;
//-----------

Expand Down

0 comments on commit b0301a2

Please sign in to comment.