summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog2
-rw-r--r--muse2/awl/CMakeLists.txt2
-rw-r--r--muse2/awl/lineedit.cpp11
-rw-r--r--muse2/awl/lineedit.h18
-rw-r--r--muse2/muse/arranger/pcanvas.cpp34
-rw-r--r--muse2/muse/arranger/pcanvas.h4
-rw-r--r--muse2/muse/cliplist/cliplist.cpp4
-rw-r--r--muse2/muse/cobject.cpp2
-rw-r--r--muse2/muse/liste/listedit.cpp1
-rw-r--r--muse2/muse/marker/markerview.cpp4
-rw-r--r--muse2/muse/master/lmaster.cpp1
-rw-r--r--muse2/muse/master/masteredit.cpp2
-rw-r--r--muse2/muse/midiedit/drumedit.cpp1
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp1
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp12
-rw-r--r--muse2/muse/waveedit/waveedit.cpp1
16 files changed, 37 insertions, 63 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index e5ea1660..c977f2c3 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,5 @@
+29.08.2011:
+ - Fixed Robert's fixes (flo93)
27.08.2011:
- Added fullscreen shortcut to all editors which have full screen action (rj)
- Part text editor now closes when focus is lost (rj)
diff --git a/muse2/awl/CMakeLists.txt b/muse2/awl/CMakeLists.txt
index 532d0c8d..21772470 100644
--- a/muse2/awl/CMakeLists.txt
+++ b/muse2/awl/CMakeLists.txt
@@ -29,7 +29,6 @@ QT4_WRAP_CPP (awl_mocs
drawbar.h
floatentry.h
knob.h
- lineedit.h
midimeter.h
midimslider.h
midipanentry.h
@@ -65,7 +64,6 @@ file (GLOB awl_source_files
floatentry.cpp
knob.cpp
# ltest.cpp
- lineedit.cpp
midimeter.cpp
midimslider.cpp
midipanentry.cpp
diff --git a/muse2/awl/lineedit.cpp b/muse2/awl/lineedit.cpp
deleted file mode 100644
index 07d2e49f..00000000
--- a/muse2/awl/lineedit.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-#include "lineedit.h"
-
-LineEdit::LineEdit(QWidget *parent) :
- QLineEdit(parent)
-{
-}
-void LineEdit::focusOutEvent ( QFocusEvent * e )
-{
- emit returnPressed();
-}
diff --git a/muse2/awl/lineedit.h b/muse2/awl/lineedit.h
deleted file mode 100644
index 4ad6116e..00000000
--- a/muse2/awl/lineedit.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef LINEEDIT_H
-#define LINEEDIT_H
-
-#include <QLineEdit>
-
-class LineEdit : public QLineEdit
-{
- Q_OBJECT
-public:
- explicit LineEdit(QWidget *parent = 0);
- void focusOutEvent ( QFocusEvent * e );
-signals:
-
-public slots:
-
-};
-
-#endif // LINEEDIT_H
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 1bf7a541..572492d6 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -16,13 +16,13 @@
#include <map>
#include <QClipboard>
+#include <QLineEdit>
#include <QMenu>
#include <QMessageBox>
#include <QPainter>
#include <QUrl>
#include <QPoint>
-#include <awl/lineedit.h>
#include "fastlog.h"
#include "widgets/tools.h"
#include "arranger.h"
@@ -154,15 +154,19 @@ void PartCanvas::leaveEvent(QEvent*)
void PartCanvas::returnPressed()
{
lineEditor->hide();
- Part* oldPart = editPart->part();
- Part* newPart = oldPart->clone();
- //printf("PartCanvas::returnPressed before msgChangePart oldPart refs:%d Arefs:%d newPart refs:%d Arefs:%d\n", oldPart->events()->refCount(), oldPart->events()->arefCount(), newPart->events()->refCount(), newPart->events()->arefCount());
-
- newPart->setName(lineEditor->text());
- // Indicate do undo, and do port controller values but not clone parts.
- audio->msgChangePart(oldPart, newPart, true, true, false);
-
- editMode = false;
+ if (editMode) {
+ //this check is neccessary, because it returnPressed may be called
+ //twice. the second call would cause a crash, however!
+ Part* oldPart = editPart->part();
+ Part* newPart = oldPart->clone();
+ //printf("PartCanvas::returnPressed before msgChangePart oldPart refs:%d Arefs:%d newPart refs:%d Arefs:%d\n", oldPart->events()->refCount(), oldPart->events()->arefCount(), newPart->events()->refCount(), newPart->events()->arefCount());
+
+ newPart->setName(lineEditor->text());
+ // Indicate do undo, and do port controller values but not clone parts.
+ audio->msgChangePart(oldPart, newPart, true, true, false);
+
+ editMode = false;
+ }
}
//---------------------------------------------------------
@@ -183,9 +187,9 @@ void PartCanvas::viewMouseDoubleClickEvent(QMouseEvent* event)
editPart = (NPart*)curItem;
QRect r = map(curItem->bbox());
if (lineEditor == 0) {
- lineEditor = new LineEdit(this);
- connect(lineEditor, SIGNAL(returnPressed()),SLOT(returnPressed()));
+ lineEditor = new QLineEdit(this);
lineEditor->setFrame(true);
+ connect(lineEditor, SIGNAL(editingFinished()),SLOT(returnPressed()));
}
editMode = true;
lineEditor->setGeometry(r);
@@ -686,9 +690,9 @@ void PartCanvas::itemPopup(CItem* item, int n, const QPoint& pt)
editPart = npart;
QRect r = map(curItem->bbox());
if (lineEditor == 0) {
- lineEditor = new LineEdit(this);
- connect(lineEditor, SIGNAL(returnPressed()),SLOT(returnPressed()));
+ lineEditor = new QLineEdit(this);
lineEditor->setFrame(true);
+ connect(lineEditor, SIGNAL(editingFinished()),SLOT(returnPressed()));
}
lineEditor->setText(editPart->name());
lineEditor->setFocus();
@@ -930,7 +934,7 @@ void PartCanvas::keyPress(QKeyEvent* event)
{
if ( key == Qt::Key_Return || key == Qt::Key_Enter )
{
- returnPressed();
+ //returnPressed(); commented out by flo
return;
}
else if ( key == Qt::Key_Escape )
diff --git a/muse2/muse/arranger/pcanvas.h b/muse2/muse/arranger/pcanvas.h
index 4d8e97f8..71a0129c 100644
--- a/muse2/muse/arranger/pcanvas.h
+++ b/muse2/muse/arranger/pcanvas.h
@@ -50,7 +50,7 @@ struct AutomationObject {
ControllerVals controllerState;
};
-class LineEdit;
+class QLineEdit;
class MidiEditor;
class QMenu;
class Xml;
@@ -66,7 +66,7 @@ class PartCanvas : public Canvas {
TrackList* tracks;
Part* resizePart;
- LineEdit* lineEditor;
+ QLineEdit* lineEditor;
NPart* editPart;
int curColorIndex;
bool editMode;
diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp
index 47f88d1b..8dbb80ef 100644
--- a/muse2/muse/cliplist/cliplist.cpp
+++ b/muse2/muse/cliplist/cliplist.cpp
@@ -16,7 +16,6 @@
#include "globals.h"
#include "wave.h"
#include "xml.h"
-#include "shortcuts.h"
#include "ui_cliplisteditorbase.h"
@@ -129,8 +128,7 @@ ClipListEdit::ClipListEdit(QWidget* parent)
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
-
+
QFontMetrics fm(editor->view->font());
int fw = style()->pixelMetric(QStyle::PM_DefaultFrameWidth,0, this); // ddskrjo 0
int w = 2 + fm.width('9') * 9 + fm.width(':') * 3 + fw * 4;
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index 318c4bc2..1dabfe76 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -11,6 +11,7 @@
#include "gui.h"
#include "globals.h"
#include "app.h"
+#include "shortcuts.h"
#include <QMdiSubWindow>
#include <QToolBar>
@@ -56,6 +57,7 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag
fullscreenAction=new QAction(tr("Fullscreen"), this);
fullscreenAction->setCheckable(true);
fullscreenAction->setChecked(false);
+ fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
connect(fullscreenAction, SIGNAL(toggled(bool)), SLOT(setFullscreen(bool)));
mdisubwin=NULL;
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index ce102dc5..bc90433d 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -500,7 +500,6 @@ ListEdit::ListEdit(PartList* pl)
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
// Toolbars ---------------------------------------------------------
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index 0e1e3c4a..fabb35fd 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -14,7 +14,6 @@
#include "sync.h"
#include "icons.h"
#include "song.h"
-#include "shortcuts.h"
///#include "posedit.h"
#include "awl/posedit.h"
@@ -179,8 +178,7 @@ MarkerView::MarkerView(QWidget* parent)
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
-
+
// Toolbars ---------------------------------------------------------
QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index ab392497..5370a493 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -158,7 +158,6 @@ LMaster::LMaster()
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
connect(tempoAction, SIGNAL(triggered()), signalMapper, SLOT(map()));
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index 9f5c45e5..1eb2d071 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -20,7 +20,6 @@
#include "xml.h"
#include "lcombo.h"
#include "doublelabel.h"
-#include "shortcuts.h"
///#include "sigedit.h"
#include "globals.h"
@@ -93,7 +92,6 @@ MasterEdit::MasterEdit()
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
// Toolbars ---------------------------------------------------------
QToolBar* undo_tools=addToolBar(tr("Undo/Redo tools"));
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 32ae8208..14419e0f 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -266,7 +266,6 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
connect(signalMapper, SIGNAL(mapped(int)), SLOT(cmd(int)));
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index c8fa1887..89f84062 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -232,7 +232,6 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
menuConfig->addAction(subwinAction);
menuConfig->addAction(shareAction);
menuConfig->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
//---------ToolBar----------------------------------
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index 1a2a4ab6..bf52f94b 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -442,8 +442,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)
settings_menu->addAction(subwinAction);
settings_menu->addAction(shareAction);
settings_menu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
-
+
init_shortcuts();
@@ -4460,10 +4459,19 @@ void staff_t::update_part_indices()
* o add everything of the function-menus of the midieditors to
* the arranger; except "move notes": call it "move parts" and
* actually move parts not notes
+ * how it works:
+ * there will be extra dialogs for the arranger
+ * when such a dialog has been executed, the "selected" option
+ * only controls the set<Part*>, but not the "selected" option
+ * which is given to the actual function call. the range option
+ * is kept.
* o replace "insert empty measure" by a "global insert"-like operation
* o replace "insert" and "paste" by a paste-dialog ("move other notes" or "overwrite notes" or "mix with notes")
* skip dialog when there is nothing to erase, move or merge with (i.e., at the end of the song)
* o remove movePartsTotheRight function
+ * o ctrl+c copies selected parts, ctrl+shift+c only the selected range
+ * if no parts are selected, ctrl+shift+c copies all in range, otherwise
+ * "selected parts" intersected with "parts in range"
* o ctrl+v uses default settings, ctrl+shift+v shows a dialog (with a "this is default" button)
* o ctrl+b and ctrl+shift+b do the same, only that they paste as clones
*
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index 003162d2..e138769d 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -154,7 +154,6 @@ WaveEdit::WaveEdit(PartList* pl)
settingsMenu->addAction(subwinAction);
settingsMenu->addAction(shareAction);
settingsMenu->addAction(fullscreenAction);
- fullscreenAction->setShortcut(shortcuts[SHRT_FULLSCREEN].key);
//---------ToolBar----------------------------------
tools = addToolBar(tr("Wave edit tools"));