Showing with 27 additions and 1 deletion.
  1. +1 −0 src/images/icons.qrc
  2. BIN src/images/kst.png
  3. +3 −1 src/libkstapp/application.cpp
  4. +20 −0 src/libkstapp/plotitemmanager.cpp
  5. +1 −0 src/libkstapp/plotitemmanager.h
  6. +2 −0 src/libkstapp/tabwidget.cpp
1 change: 1 addition & 0 deletions src/images/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@
<file>svg_icons/kst_downarrow.svgz</file>
<file>svg_icons/kst_bold.svgz</file>
<file>svg_icons/kst_italic.svgz</file>
<file>svg_icons/kst.svgz</file>
</qresource>
</RCC>
Binary file modified src/images/kst.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/libkstapp/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "datasourcepluginmanager.h"
//#include "dialogscriptinterface.h"
#include "settings.h"
#include "geticon.h"


#include <QIcon>

Expand All @@ -36,7 +38,7 @@ Application::Application(int &argc, char **argv)
: QApplication(argc, argv) {

QCoreApplication::setApplicationName("Kst");
setWindowIcon(QPixmap(":kst.png"));
setWindowIcon(KstGetIcon("kst"));

Builtins::initPrimitives(); //libkst
Builtins::initDataSources(); //libkstapp
Expand Down
20 changes: 20 additions & 0 deletions src/libkstapp/plotitemmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,26 @@ void PlotItemManager::toggleAllTiedZoom(View *view) {
}


void PlotItemManager::clearAllTiedZoom(View *view) {

bool tiedZoom;

QList<ViewItem *> tieable_items;
if (view) {
tieable_items = tieableItemsForView(view);
} else {
tieable_items = tieableItems();
}
tiedZoom = false;

foreach(ViewItem* viewItem, tieable_items) {
if (viewItem->supportsTiedZoom()) {
viewItem->setTiedZoom(tiedZoom, tiedZoom, false);
}
}
}


void PlotItemManager::addTiedZoomViewItem(ViewItem *viewItem, bool checkAll) {
if (!_tiedZoomViewItemLists.contains(viewItem->view())) {
_tiedZoomViewItemLists.insert(viewItem->view(), QList<ViewItem*>() << viewItem);
Expand Down
1 change: 1 addition & 0 deletions src/libkstapp/plotitemmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class PlotItemManager : public QObject
static QList<ViewItem*> tiedZoomViewItems(PlotItem* plotItem);

void toggleAllTiedZoom(View *view);
void clearAllTiedZoom(View *view);

Q_SIGNALS:
void tiedZoomRemoved();
Expand Down
2 changes: 2 additions & 0 deletions src/libkstapp/tabwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "viewitem.h"
#include "curveplacement.h"
#include "plotitem.h"
#include "plotitemmanager.h"
#include "plotrenderitem.h"

#include <QInputDialog>
Expand Down Expand Up @@ -134,6 +135,7 @@ QList<View*> TabWidget::views() const {

void TabWidget::deleteView(View* view) {
MainWindow *parent = qobject_cast<MainWindow*>(this->parent());
PlotItemManager::self()->clearAllTiedZoom(view);
if (parent) {
parent->undoGroup()->removeStack(view->undoStack());
}
Expand Down