Skip to content

Commit

Permalink
tooltip, and try to keep positions, re #8091
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Oct 27, 2014
1 parent aba0f88 commit 9be889d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/MantidPlot/src/ConfigDialog.cpp
Expand Up @@ -731,6 +731,7 @@ void ConfigDialog::initMantidOptionsTab()
{
m_reusePlotInstances->setChecked(false);
}
m_reusePlotInstances->setToolTip("If on, the same plot instance will be re-used for every of the different plots available in the workspaces window (spectrum, slice, color fill, etc.)");

//create a checkbox for invisible workspaces options
m_invisibleWorkspaces = new QCheckBox("Show Invisible Workspaces");
Expand Down
10 changes: 9 additions & 1 deletion Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp
Expand Up @@ -769,9 +769,11 @@ void MantidUI::showSpectrumViewer()
if (m_lastShownSpectrumViewerWin)
{
m_lastShownSpectrumViewerWin->close();
QPoint p = m_lastShownSpectrumViewerWin->pos();
delete m_lastShownSpectrumViewerWin;

viewer->move(p);
}

}
m_lastShownSpectrumViewerWin = viewer;

Expand Down Expand Up @@ -834,7 +836,11 @@ void MantidUI::showSliceViewer()
if (m_lastShownSliceViewWin)
{
m_lastShownSliceViewWin->close();
QPoint p = m_lastShownSliceViewWin->pos();
// the factory keeps a list of all opened slice viewers
MantidQt::Factory::WidgetFactory::Instance()->closeSliceViewerWindow(m_lastShownSliceViewWin);
delete m_lastShownSliceViewWin;
w->move(p);
}
}
m_lastShownSliceViewWin = w;
Expand Down Expand Up @@ -2017,7 +2023,9 @@ void MantidUI::showMantidInstrument(const QString& wsName)
if (m_lastShownInstrumentWin)
{
m_lastShownInstrumentWin->close();
QPoint p = m_lastShownInstrumentWin->pos();
delete m_lastShownInstrumentWin;
insWin->move(p);
}
}
m_lastShownInstrumentWin = insWin;
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/src/Mantid/MantidUI.h
Expand Up @@ -540,7 +540,7 @@ private slots:
QMenu *menuMantidMatrix; // MantidMatrix specific menu
AlgorithmMonitor *m_algMonitor; // Class for monitoring running algorithms

// keep track of the last shown, which will be killed if showing only one inst. window
// keep track of the last shown, which will be refreshed or killed/rebuilt if showing only one inst. window
InstrumentWindow *m_lastShownInstrumentWin;
MantidQt::SliceViewer::SliceViewerWindow *m_lastShownSliceViewWin;
MantidQt::SpectrumView::SpectrumView *m_lastShownSpectrumViewerWin;
Expand Down

0 comments on commit 9be889d

Please sign in to comment.