|
From: Tapio V. <aa...@us...> - 2011-01-11 14:46:51
|
Module: editor
Branch: master
Commit: 23ec7e8d6f0d1c77e8b3e0293c2b67787183b78d
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 11 16:40:54 2011 +0200
Note type change now updates pixmap immediately.
---
editorapp.cc | 2 +-
notelabel.hh | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index 69e9ca7..19cbafa 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -160,7 +160,7 @@ void EditorApp::on_actionAbout_triggered()
void EditorApp::on_cmbNoteType_currentIndexChanged(int index)
{
if (ui.noteGraph->selectedNote())
- ui.noteGraph->selectedNote()->note().type = Note::Type(index);
+ ui.noteGraph->selectedNote()->setType(index);
}
void EditorApp::on_chkFloating_stateChanged(int state)
diff --git a/notelabel.hh b/notelabel.hh
index 0926b9f..99aff0b 100644
--- a/notelabel.hh
+++ b/notelabel.hh
@@ -23,6 +23,7 @@ public:
bool isFloating() const { return m_floating; }
void setFloating(bool state) { m_floating = state; createPixmap(size()); }
+ void setType(int newtype) { m_note.type = Note::Type(newtype); createPixmap(size()); }
void startResizing(int dir);
void startDragging(const QPoint& point);
|