Skip to content

Commit

Permalink
Change magnifying glass to pan tool icon. Refs #6133
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Jan 25, 2013
1 parent 818b421 commit 04a92cd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/Images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<file>ISIS_Logo_Transparent.gif</file>
<file>Mantid_Logo_Transparent.png</file>
<file>data_replace.png</file>
<file>panning.png</file>
</qresource>
<qresource prefix="/Icons">
<file>LoadFile.png</file>
Expand Down
Binary file added Code/Mantid/Images/panning.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 11 additions & 12 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,10 +926,9 @@ void ApplicationWindow::initToolBars()
btnPointer->setChecked(true);
plotTools->addAction(btnPointer);


actionMagnify->setActionGroup(dataTools);
actionMagnify->setCheckable( true );
plotTools->addAction(actionMagnify);
actionPanPlot->setActionGroup(dataTools);
actionPanPlot->setCheckable( true );
plotTools->addAction(actionPanPlot);

btnZoomIn = new QAction(tr("&Zoom In"), this);
btnZoomIn->setShortcut( tr("Ctrl++") );
Expand Down Expand Up @@ -1335,7 +1334,7 @@ void ApplicationWindow::plotDataMenuAboutToShow()
plotDataMenu->addAction(btnPointer);
plotDataMenu->addAction(btnZoomIn);
plotDataMenu->addAction(btnZoomOut);
plotDataMenu->addAction(actionMagnify);
plotDataMenu->addAction(actionPanPlot);
plotDataMenu->addAction(actionUnzoom);
plotDataMenu->insertSeparator();
plotDataMenu->addAction(btnCursor);
Expand Down Expand Up @@ -12442,8 +12441,8 @@ void ApplicationWindow::pickDataTool( QAction* action )
drawLine();
else if (action == btnMultiPeakPick)
selectMultiPeak();
else if (action == actionMagnify)
magnify();
else if (action == actionPanPlot)
panOnPlot();
}

void ApplicationWindow::connectSurfacePlot(Graph3D *plot)
Expand Down Expand Up @@ -13399,8 +13398,8 @@ void ApplicationWindow::createActions()
connect(actionreleaseFreeMemory,SIGNAL(triggered()), mantidUI, SLOT(releaseFreeMemory() ));
#endif

actionMagnify = new QAction(QIcon(getQPixmap("magnifier_xpm")), tr("Zoom &In/Out and Drag Canvas"), this);
connect(actionMagnify, SIGNAL(activated()), this, SLOT(magnify()));
actionPanPlot = new QAction(QIcon(":/panning.png"), tr("Panning tool"), this);
connect(actionPanPlot, SIGNAL(activated()), this, SLOT(panOnPlot()));

actionICatLogin = new QAction("Login",this);
actionICatLogin->setToolTip(tr("Catalog Login"));
Expand Down Expand Up @@ -13900,8 +13899,8 @@ void ApplicationWindow::translateActionsStrings()
btnZoomOut->setShortcut(tr("Ctrl+-"));
btnZoomOut->setToolTip(tr("Zoom Out"));

actionMagnify->setMenuText(tr("Zoom &In/Out and Drag Canvas"));
actionMagnify->setToolTip(tr("Zoom In (Shift++) or Out (-) and Drag Canvas"));
actionPanPlot->setMenuText(tr("Zoom &In/Out and Drag Canvas"));
actionPanPlot->setToolTip(tr("Panning tool (zoom with mouse wheel)"));

btnCursor->setMenuText(tr("&Data Reader"));
btnCursor->setShortcut(tr("CTRL+D"));
Expand Down Expand Up @@ -17610,7 +17609,7 @@ void ApplicationWindow::enablesaveNexus(const QString &wsName)
}
/* For zooming the selected graph using the drag canvas tool and mouse drag.
*/
void ApplicationWindow::magnify()
void ApplicationWindow::panOnPlot()
{
MultiLayer *plot = dynamic_cast<MultiLayer*>(activeWindow(MultiLayerWindow));
if (!plot)
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ public slots:
void showmantidplotHelp();

/// for zooming the selected graph using mouse drag tool
void magnify();
void panOnPlot();

/// Handler for ICat login menu
void ICatLogin();
Expand Down Expand Up @@ -1478,7 +1478,7 @@ public slots:
QAction *wireframe, *hiddenline, *polygon, *filledmesh, *pointstyle, *barstyle, *conestyle, *crossHairStyle;
QAction *actionShowUndoStack;
QActionGroup *coord, *floorstyle, *grids, *plotstyle, *dataTools;
QAction *actionMagnify;
QAction *actionPanPlot;
QAction *actionWaterfallPlot;

//mantid log level control
Expand Down

0 comments on commit 04a92cd

Please sign in to comment.