changeset 600:f3842da4d510 with-dependencies

Merge from default
author Chris Cannam <chris.cannam@eecs.qmul.ac.uk>
date Wed, 24 Jul 2013 18:25:45 +0100
parents 4901db78f907 (current diff) 110eecb5d9f6 (diff)
children fa99b4775d35
files .hgsubstate
diffstat 3 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Wed Jul 24 18:19:46 2013 +0100
+++ b/.hgsubstate	Wed Jul 24 18:25:45 2013 +0100
@@ -1,5 +1,5 @@
 7096c7de2d4c327de5e028c33036f146a1884706 dataquay
 619f715526df43e23b2b9b50715e825941572352 sv-dependency-builds
 2925a4bbca5e86036d564aaac1bcf7fd11226ca9 svapp
-12aff5a181bc6376c546ebbb27f48f99e2619ae8 svcore
+a1bb2989013dc380e3baf6b6e9704520f62b3bc0 svcore
 0aea4b9e4c3dca9c42f9181748bdfde924a8574f svgui
--- a/main/MainWindow.cpp	Wed Jul 24 18:19:46 2013 +0100
+++ b/main/MainWindow.cpp	Wed Jul 24 18:25:45 2013 +0100
@@ -775,9 +775,15 @@
         }
     }
 
+    action = new QAction(tr("Reset Numbering Counters"), this);
+    action->setStatusTip(tr("Reset to 1 all the counters used for counter-based labelling"));
+    connect(action, SIGNAL(triggered()), this, SLOT(resetInstantsCounters()));
+    connect(this, SIGNAL(replacedDocument()), action, SLOT(trigger()));
+    menu->addAction(action);
+
     action = new QAction(tr("Set Numbering Counters..."), this);
     action->setStatusTip(tr("Set the counters used for counter-based labelling"));
-    connect(action, SIGNAL(triggered()), this, SLOT(resetInstantsCounters()));
+    connect(action, SIGNAL(triggered()), this, SLOT(setInstantsCounters()));
     menu->addAction(action);
             
     action = new QAction(tr("Renumber Selected Instants"), this);
@@ -2061,6 +2067,7 @@
     action->setShortcut(tr("1"));
     action->setStatusTip(tr("Navigate"));
     connect(action, SIGNAL(triggered()), this, SLOT(toolNavigateSelected()));
+    connect(this, SIGNAL(replacedDocument()), action, SLOT(trigger()));
     group->addAction(action);
     m_keyReference->registerShortcut(action);
     m_toolActions[ViewManager::NavigateMode] = action;
@@ -4048,7 +4055,7 @@
 }
 
 void
-MainWindow::resetInstantsCounters()
+MainWindow::setInstantsCounters()
 {
     LabelCounterInputDialog dialog(m_labeller, this);
     dialog.setWindowTitle(tr("Reset Counters"));
@@ -4056,6 +4063,12 @@
 }
 
 void
+MainWindow::resetInstantsCounters()
+{
+    if (m_labeller) m_labeller->resetCounters();
+}
+
+void
 MainWindow::modelGenerationFailed(QString transformName, QString message)
 {
     emit hideSplash();
--- a/main/MainWindow.h	Wed Jul 24 18:19:46 2013 +0100
+++ b/main/MainWindow.h	Wed Jul 24 18:25:45 2013 +0100
@@ -121,6 +121,7 @@
 
     virtual void setInstantsNumbering();
     virtual void setInstantsCounterCycle();
+    virtual void setInstantsCounters();
     virtual void resetInstantsCounters();
 
     virtual void modelGenerationFailed(QString, QString);