# HG changeset patch # User Chris Cannam # Date 1256226861 0 # Node ID 3211f8cef51a955bfd08d96425d18351f7ab3c20 # Parent e91910707283a731e5267864b679515f5d310b83 * Layer data editor window: fix sorting for columns in region model, add Find feature * RDF import: assign names to layers based on event types, if no suitable labels are found in the RDF * Add label to status bar showing the last text that was passed in current layer (so e.g. counting 1, 2, 3, 4 if that's what beats are labelled) * Better layout of text labels for region layers in segmentation mode when they are close together * Give text layer the same method for finding "nearest point" as region and note layers, should improve its editability diff -r e91910707283 -r 3211f8cef51a main/MainWindow.cpp --- a/main/MainWindow.cpp Fri Oct 16 08:31:02 2009 +0000 +++ b/main/MainWindow.cpp Thu Oct 22 15:54:21 2009 +0000 @@ -37,6 +37,7 @@ #include "layer/SliceLayer.h" #include "layer/SliceableLayer.h" #include "layer/ImageLayer.h" +#include "layer/RegionLayer.h" #include "widgets/Fader.h" #include "view/Overview.h" #include "widgets/PropertyBox.h" @@ -277,6 +278,8 @@ setupHelpMenu(); statusBar(); + m_currentLabel = new QLabel; + statusBar()->addPermanentWidget(m_currentLabel); connect(m_viewManager, SIGNAL(activity(QString)), m_activityLog, SLOT(activityHappened(QString))); @@ -3491,6 +3494,33 @@ } statusBar()->showMessage(m_myStatusMessage); + + updatePositionStatusDisplays(); +} + +void +MainWindow::updatePositionStatusDisplays() const +{ + if (!statusBar()->isVisible()) return; + + Pane *pane = 0; + size_t frame = m_viewManager->getPlaybackFrame(); + + if (m_paneStack) pane = m_paneStack->getCurrentPane(); + if (!pane) return; + + int layers = pane->getLayerCount(); + if (layers == 0) m_currentLabel->setText(""); + + for (int i = layers-1; i >= 0; --i) { + Layer *layer = pane->getLayer(i); + if (!layer) continue; + if (!layer->isLayerEditable()) continue; + QString label = layer->getLabelPreceding + (pane->alignFromReference(frame)); + m_currentLabel->setText(label); + break; + } } void diff -r e91910707283 -r 3211f8cef51a main/MainWindow.h --- a/main/MainWindow.h Fri Oct 16 08:31:02 2009 +0000 +++ b/main/MainWindow.h Thu Oct 22 15:54:21 2009 +0000 @@ -213,6 +213,8 @@ QFrame *m_playControlsSpacer; int m_playControlsWidth; + QLabel *m_currentLabel; + QPointer m_preferencesDialog; QPointer m_layerTreeDialog; @@ -268,6 +270,7 @@ virtual bool checkSaveModified(); virtual void updateVisibleRangeDisplay(Pane *p) const; + virtual void updatePositionStatusDisplays() const; virtual bool shouldCreateNewSessionForRDFAudio(bool *cancel);